Expand description
Hardware-agnostic compute target abstraction.
Defines the ComputeTarget trait: the contract that any GPU compilation
and runtime target must satisfy (NVIDIA/PTX, AMD/HSACO, Apple/Metal, etc.).
Atlas is designed so that:
- Build time: kernel source files are compiled by a target-specific compiler into a target-specific binary format (PTX, SPIR-V, metallib).
- Runtime: the binary modules are loaded via
GpuBackend::kernel()and executed viaGpuBackend::launch().
This module covers the build-time contract. The runtime contract is
defined by GpuBackend in spark-runtime.
§Extending to new hardware
- Create a
HARDWARE.tomlinkernels/<hw>/withvendor = "<vendor>". - Implement
ComputeTargetfor the new vendor. - Write kernel source files in the vendor’s language (
.cu,.metal,.cl). - Implement
GpuBackendin spark-runtime for the vendor’s runtime API.
Structs§
- Nvidia
Target - NVIDIA CUDA compilation target:
.cu→ PTX vianvcc.
Enums§
- Vendor
- Vendor identifier parsed from
HARDWARE.toml.
Traits§
- Compute
Target - Build-time compilation target contract.
Functions§
- target_
for_ vendor - Resolve the appropriate
ComputeTargetfrom a HARDWARE.toml vendor field.