Programación en GPU
El artefacto GPU versionado, la sintaxis verificada y el estado attested.
Programación en GPU
Sounio ahora tiene dos perfiles versionados en este checkout:
souc-linux-x86_64: perfil nativo por defectosouc-linux-x86_64-gpu: perfil público para GPU
Ruta GPU self-hosted
El compilador self-hosted por defecto (bin/souc) acepta sintaxis de kernels GPU y permite que kretikos emita plantillas de artefactos predefinidas:
# Emitir la plantilla PTX predefinida vec_add
kretikos emit-ptx vec_add -o /tmp/kernel.ptx
kretikos emit-ptx vec_sub -o /tmp/kernel.ptx
kretikos emit-ptx vec_mul -o /tmp/kernel.ptx
kretikos emit-ptx vec_div -o /tmp/kernel.ptx
kretikos emit-ptx vec_add_f64 -o /tmp/kernel.ptx
kretikos emit-ptx fma -o /tmp/kernel.ptx
kretikos emit-metal vec_add -o /tmp/kernel.metal
kretikos emit-metal ossm_oct_step -o /tmp/kernel.metal
kretikos emit-metal sedenion_cd_step -o /tmp/kernel.metal
# Emitir la plantilla CUBIN predefinida vec_add_f32
kretikos emit-cubin vec_add_f32 -o /tmp/kernel.cubin
# Emitir PTX+CUBIN y un manifiesto estructural del bundle
kretikos bundle -o /tmp/kretikos-bundle
Verificado hoy
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
Eso prueba hoy:
- GPU codegen está activado en el artefacto GPU versionado.
- La ruta pública para emitir PTX es
build --backend gpu. kernel fn,with GPU,GPU.launchyGPU.syncson aceptados por el perfil GPU versionado.
Superficie pública actual
Parte pública y verificada:
kernel fnwith GPUperform GPU.launch(...)perform GPU.sync()- Emisión PTX mediante
build --backend gpu
Todavía no forma parte de la superficie pública versionada:
gpu.thread_id.*gpu.block_id.*gpu.block_dim.*gpu.alloc<T>(...)
Evidencia de backend
Los artefactos fuertes viven en artifacts/omega/:
gpu_codegen_parity.v1.jsongpu_binary_attestation.v1.jsongpu_runtime_attest_gate.v1.jsongpu_public_contract.v1.json
Lanes de cómputo attestados hoy:
- CUDA:
cuda-sm80 - ROCm:
rocm-gfx942