GPU 编程

版本化 GPU 构件、已验证语法与当前 attested 状态。

GPU 编程

这个仓库快照现在有两个已提交的编译器 profile:

  • souc-linux-x86_64-jit:默认 JIT profile
  • souc-linux-x86_64-gpu:公开 GPU profile

今日已验证

export SOUC_GPU_BIN="$(pwd)/artifacts/omega/souc-bin/souc-linux-x86_64-gpu"
export SOUNIO_STDLIB_PATH="$(pwd)/stdlib"

"$SOUC_GPU_BIN" info
"$SOUC_GPU_BIN" check examples/gpu.sio
"$SOUC_GPU_BIN" check tests/run-pass/gpu_launch_surface.sio
"$SOUC_GPU_BIN" build examples/kernel_matmul.sio --backend gpu -o /tmp/kernel_matmul.ptx

这说明今天公开可证明的部分是:

  • 已提交 GPU 构件启用了 GPU codegen。
  • 公开 PTX 输出路径是 build --backend gpu
  • kernel fnwith GPUGPU.launchGPU.sync 被该 GPU profile 接受。

当前公开表面

当前已验证的公开表面:

  • kernel fn
  • with GPU
  • perform GPU.launch(...)
  • perform GPU.sync()
  • 通过 build --backend gpu 输出 PTX

当前还不属于已提交公开表面:

  • gpu.thread_id.*
  • gpu.block_id.*
  • gpu.block_dim.*
  • gpu.alloc<T>(...)

后端证据

最强证据位于 artifacts/omega/

  • gpu_codegen_parity.v1.json
  • gpu_binary_attestation.v1.json
  • gpu_runtime_attest_gate.v1.json
  • gpu_public_contract.v1.json

当前 attested 计算 lanes:

  • CUDA:cuda-sm80
  • ROCm:rocm-gfx942