CPU 오라클
export 10개
모듈을 f64로 실행하는 CPU 백엔드입니다. 여기서 나온 값이 GPU 출력을 맞춰 보는 기준이 됩니다.
시그니처, 설명, 예제는 커밋 26de7be8의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
-
compileModule함수 - 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함수 - Compile a module for the CPU by generating JavaScript, returning the same CpuModule shape compileModule returns and the same results bit for bit.
-
CpuModule인터페이스 - The shape both CPU backends return, so a caller can compile with compileModuleJs and fall back to compileModule without touching call sites.
-
CpuPrecision타입 - How the CPU backends evaluate f32 arithmetic.
-
CpuStruct인터페이스 - A struct value on the CPU: a plain object keyed by field name, holding one CpuValue per field.
-
CpuValue타입 - A value as the CPU backends (compileModule and compileModuleJs) represent it: a plain JavaScript value, never a typed array or a GPU buffer.
-
DispatchReport인터페이스 - 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상수 - The names of every builtin function the CPU backends (compileModule, compileModuleJs) evaluate with real arithmetic, as a read-only set.
-
ORACLE_GPU_STUB_NAMES상수 - 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타입 - The shape of workgroups a dispatch takes: one number for a 1-D grid, or the three counts.