CPU oracle
10 members
The CPU backend that runs a module in f64 and gives the reference values to compare against.
The signature, the description and the examples come from the compiler's own source at commit af54ddad5.
-
compileModuleFunction - Compile a module for the CPU: a tree-walk interpreter over the same IR the GPU backends receive, returning a CpuModule whose fns are ordinary JavaScript functions.
-
compileModuleJsFunction - Compile a module for the CPU by generating JavaScript, returning the same CpuModule shape compileModule returns and the same results bit for bit.
-
CpuModuleInterface - The shape both CPU backends return, so a caller can compile with compileModuleJs and fall back to compileModule without touching call sites.
-
CpuPrecisionType - How the CPU backends evaluate
f32arithmetic. -
CpuStructInterface - A struct value on the CPU: a plain object keyed by field name, holding one CpuValue per field.
-
CpuValueType - A value as the CPU backends (compileModule and compileModuleJs) represent it: a plain JavaScript value, never a typed array or a GPU buffer.
-
DispatchReportInterface - What a CpuModule.dispatch ran: the workgroups, the invocations across them, and how many barrier phases the invocations of each workgroup went through in total.
-
ORACLE_BUILTIN_NAMESConstant - The names of every builtin function the CPU backends (compileModule, compileModuleJs) evaluate with real arithmetic, as a read-only set.
-
ORACLE_GPU_STUB_NAMESConstant - The names of every GPU-only intrinsic the CPU backends cannot genuinely evaluate, as a read-only set:
textureSample,textureSampleLevel,textureSampleBias,textureSampleGrad,textureLoad, their 2d-array forms, the depth comparisons,textureDimensions,textureNumLayers, and the derivatives fwidth, dpdx and dpdy. -
WorkgroupCountType - The shape of workgroups a dispatch takes: one number for a 1-D grid, or the three counts.