Module Tolk.Gpu_target
Resolved GPU target descriptors for renderer construction.
This module owns CUDA/AMD target selection policy. Renderers consume these resolved targets and do not read environment variables themselves.
Metal GPU family used by source generation. Mirrors tinygrad's Metal target architecture string, e.g. "Apple7" or "Mac2".
OpenCL target architecture string used by source generation. Mirrors tinygrad's comma-separated Target.arch, normally the device extension list such as "cl_khr_fp16,cl_khr_fp64".
CPU architecture family used by source generation. Mirrors tinygrad's normalized CPU target architecture prefix.
val cpu_of_machine : string -> cpu optioncpu_of_machine s normalizes host machine names such as "amd64" or "aarch64" to CPU renderer targets.
val host_cpu : unit -> cpuhost_cpu () is the CPU renderer target for the current host.
Raises Invalid_argument if the host architecture is unsupported.
val cuda_of_env : unit -> cuda optioncuda_of_env () resolves CUDA_ARCH or CUDA_SM to the nearest supported CUDA SM tier. Returns None when no supported tier is configured.
val amd_of_env : unit -> amd optionamd_of_env () resolves common AMD arch environment variables such as AMD_ARCH, HIP_ARCH, HCC_AMDGPU_TARGET, or HSA_OVERRIDE_GFX_VERSION. Returns None when no supported arch family is configured.
val parse_metal_arch : string -> metal optionparse_metal_arch s parses tinygrad-style Metal architecture names such as "Apple7" and "Mac2".