CPU 오라클

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.

이 페이지 편집 문제 보고