CPU oracle

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 26de7be8.

compileModule Function
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.
compileModuleJs Function
Compile a module for the CPU by generating JavaScript, returning the same CpuModule shape compileModule returns and the same results bit for bit.
CpuModule Interface
The shape both CPU backends return, so a caller can compile with compileModuleJs and fall back to compileModule without touching call sites.
CpuPrecision Type
How the CPU backends evaluate f32 arithmetic.
CpuStruct Interface
A struct value on the CPU: a plain object keyed by field name, holding one CpuValue per field.
CpuValue Type
A value as the CPU backends (compileModule and compileModuleJs) represent it: a plain JavaScript value, never a typed array or a GPU buffer.
DispatchReport Interface
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_NAMES Constant
The names of every builtin function the CPU backends (compileModule, compileModuleJs) evaluate with real arithmetic, as a read-only set.
ORACLE_GPU_STUB_NAMES Constant
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.
WorkgroupCount Type
The shape of workgroups a dispatch takes: one number for a 1-D grid, or the three counts.

Edit this page Report a problem