Triton · Pyodide · Emscripten

Build the compiler.

A compilation-only WebAssembly port of Triton for NVIDIA PTX, AMDGCN, and Gluon gfx950. The browser loads Python plus one side module; it never receives LLVM archives or a GPU runtime.

O4 + full LTO shipped
Current shipped profile
Full LTO · Release O3 · wasm-opt O4

The deployed side module is 96,531,399 bytes after Full LTO, section garbage collection, andwasm-opt -O4. It passes the NVIDIA PTX, AMD gfx942, Gluon GFX950, and supplied v9 compilation-only checks. The older 92,972,220-byte O3 module is kept as the benchmark baseline; this profile favors compiler speed and backend coverage.

compile-only

What the build proves

Textual GPU output only; no driver or device is needed.

PathTargetOutputBoundary
Triton / NVIDIAcuda:80:32PTX textNo cubin or ptxas
Triton / AMDhip:gfx942:64AMDGCN textNo HSACO or ROCm
Gluon / AMDhip:gfx950:64AMDGCN textNo GPU launch
Supplied v9 kernelhip:gfx950:64LLIR + AMDGPU asmCompile-only
Stage 01

Pin compatible sources

Triton and LLVM are built from revisions known to agree. Only MLIR plus the WebAssembly, NVPTX, and AMDGPU targets are retained for the browser package.

Stage 02

Compile LLVM as a host library

LLVM and MLIR are linked once while producing the side module. Their static archives stay on the build machine; the browser never downloads them.

Stage 03

Package for Pyodide

The runtime payload is Python modules plus one Emscripten side module. CUDA, ROCm, ptxas, HSACO, and a GPU are intentionally absent.

Stage 04

Optimize and verify

The side module is linked with Full LTO, optimized with Binaryen at O4, then checked against every compilation-only target before it ships.

Compiler boundaries

These are the details that make the browser package different from native Triton.

Host-only LLVM

LLVM and MLIR archives are consumed while linking the side module and are not part of the download. AMD bitcode helpers such asocml.bc,ockl.bc, andasanrtl.bcship as compiler inputs inside the package.

GFX950 contract

The supplied Gluon kernel useship:gfx950:64, four warps,amdgpu-agpr-alloc=256, 16-byte pointer alignment, and K-contiguous B strides:stride_bk=1,stride_bn=K.

Inspect the output

Compiles emit TTGIR, LLIR, and AMDGPU assembly. The final assembly is textual AMDGCN; it is not HSACO and is not launchable by this package.