载入中...
搜索中...
未找到
KernelGenWgslInternal.h
浏览该文件的文档.
1#pragma once
3
4// Private implementation shared by the WGSL kernel families.
6inline constexpr int kLocalSize = 256;
8std::string header(int localX, int localY = 1);
10std::string bufferDecl(int binding, const char *name);
12std::string bufferDeclUint(int binding, const char *name);
14std::string pushConstant();
16std::string scalarStr(float value);
18std::string emitQuantizedBVal(DType dtype, int group, const char *bufferName);
20int groupsFor(int count);
22void specializeInputBindings(const Graph &, const FusedGroup &, KernelSpec &);
24void genSoftmax(const Graph &, const FusedGroup &, KernelSpec &);
26void genNorm(const Graph &, const FusedGroup &, bool rms, KernelSpec &);
28void genReduceOrArgmax(const Graph &, const FusedGroup &, bool argmax, KernelSpec &);
30void genEmbedding(const Graph &, const FusedGroup &, KernelSpec &);
32void genConcat(const Graph &, const FusedGroup &, KernelSpec &);
34void genSlice(const Graph &, const FusedGroup &, KernelSpec &);
36void genPermute(const Graph &, const FusedGroup &, KernelSpec &);
38void genResize2d(const Graph &, const FusedGroup &, KernelSpec &);
40void genSdpa(const Graph &, const FusedGroup &, KernelSpec &);
41} // namespace eve::tensor::wgsl_detail
double value
building::EdgeCurveGroup group
std::string name
eve::action::ActionVfxBinding binding
std::uint32_t count
EVENGINE_API_DOMAINS public API.
Definition Graph.h:111
std::string scalarStr(float v)
Scalar str.
void genSlice(const Graph &g, const FusedGroup &grp, KernelSpec &out)
Gen slice.
void genConcat(const Graph &g, const FusedGroup &grp, KernelSpec &out)
Gen concat.
std::string emitQuantizedBVal(DType dt, int group, const char *bufName="b")
Emit quantized b val.
void genResize2d(const Graph &g, const FusedGroup &grp, KernelSpec &out)
Gen resize 2 d.
std::string bufferDeclUint(int binding, const char *name)
Buffer decl uint.
void genPermute(const Graph &g, const FusedGroup &grp, KernelSpec &out)
Gen permute.
void specializeInputBindings(const Graph &graph, const FusedGroup &group, KernelSpec &spec)
Specialize input bindings.
void genEmbedding(const Graph &g, const FusedGroup &grp, KernelSpec &out)
Gen embedding.
std::string bufferDecl(int binding, const char *name)
Buffer decl.
std::string pushConstant()
Pushes constant.
void genSoftmax(const Graph &, const FusedGroup &, KernelSpec &)
Gen softmax.
int groupsFor(int count)
Groups for.
void genReduceOrArgmax(const Graph &, const FusedGroup &, bool argmax, KernelSpec &)
Gen reduce or argmax.
void genSdpa(const Graph &g, const FusedGroup &grp, KernelSpec &out)
Gen sdpa.
void genNorm(const Graph &, const FusedGroup &, bool rms, KernelSpec &)
Gen norm.
std::string header(int localX, int localY)
Header.
DType
Tensor element types.
Definition Tensor.h:24
FusedGroup public API.
Definition Optimizer.h:46
KernelSpec public API.
Definition KernelGen.h:27