载入中...
搜索中...
未找到
eve::tensor::KernelSpec结构体 参考

KernelSpec public API. 更多...

#include <KernelGen.h>

Public 属性

std::string pass1
 
std::string pass2
 
int groupsX1 = 0
 
int groupsY1 = 1
 
int groupsZ1 = 1
 
int groupsX2 = 0
 
int groupsY2 = 1
 
int groupsZ2 = 1
 
std::vector< int > inputRepresentatives
 Input slot to representative slot; empty means identity. WGSL aliases repeated read inputs to one declaration so WebGPU never binds overlapping writable ranges.
 
int inputCount = 0
 
int inputsReadPass1 = 0
 
int statsCount = 0
 
int statsSize = 0
 
bool twoPass = false
 
int qDtype = 0
 
int qGroup = 0
 
int scalesBinding = -1
 
int outputBinding = -1
 

详细描述

KernelSpec public API.

A generated, fully specialized compute kernel (AITemplate-style codegen).

Shapes are baked into the GLSL or WGSL as constants; the only runtime inputs are the storage buffers themselves, so a CompiledFunction is a static executable program with no per-dispatch shape computation.

Binding layout:

  • single-pass kernels: inputs 0..k-1, output binding k;
  • two-pass kernels (softmax / layernorm / rmsnorm): pass1 binds the first inputsReadPass1 inputs + statsCount stats buffers; pass2 binds all inputs + stats + the output as the last binding.

在文件 KernelGen.h 第 27 行定义.

类成员变量说明

◆ groupsX1

int eve::tensor::KernelSpec::groupsX1 = 0

◆ groupsX2

◆ groupsY1

int eve::tensor::KernelSpec::groupsY1 = 1

在文件 KernelGen.h 第 30 行定义.

◆ groupsY2

◆ groupsZ1

int eve::tensor::KernelSpec::groupsZ1 = 1

在文件 KernelGen.h 第 30 行定义.

◆ groupsZ2

int eve::tensor::KernelSpec::groupsZ2 = 1

在文件 KernelGen.h 第 31 行定义.

◆ inputCount

◆ inputRepresentatives

std::vector<int> eve::tensor::KernelSpec::inputRepresentatives

Input slot to representative slot; empty means identity. WGSL aliases repeated read inputs to one declaration so WebGPU never binds overlapping writable ranges.

在文件 KernelGen.h 第 34 行定义.

被这些函数引用 eve::tensor::wgsl_detail::specializeInputBindings().

◆ inputsReadPass1

◆ outputBinding

int eve::tensor::KernelSpec::outputBinding = -1

◆ pass1

◆ pass2

◆ qDtype

◆ qGroup

◆ scalesBinding

int eve::tensor::KernelSpec::scalesBinding = -1

◆ statsCount

◆ statsSize

◆ twoPass


该结构体的文档由以下文件生成: