Module compute

Module compute 

Source
Expand description

2026-09-25: A build-time kernel compilation target: the Vendor parsed from HARDWARE.toml, the ComputeTarget trait, and its nvcc implementation.

No code outside this file uses the module. The kernel build script declares its own ComputeTarget trait and vendor implementations in crates/kernels/build_target.rs. The runtime side is the GpuBackend trait in metrale-gpu-runtime.

Owner: core. Invariants: none beyond the types.

Structs§

NvidiaTarget
2026-09-25: NVIDIA compilation target: .cu to PTX with nvcc --ptx -arch=<arch> -O3.

Enums§

Vendor
2026-09-25: Vendor identifier parsed from a HARDWARE.toml vendor string.

Traits§

ComputeTarget
2026-09-25: How one vendor compiles kernel source files into loadable modules. NvidiaTarget is the only implementation.

Functions§

target_for_vendor
2026-09-25: Resolve the ComputeTarget for a HARDWARE.toml vendor string. A missing or unrecognised vendor resolves to NvidiaTarget.