Skip to main content

Module accel

Module accel 

Source
Expand description

Accelerator selection for the tensorized EML forward pass.

phop has four forward-eval backends: NVIDIA CUDA (gpu-cuda, exact f64, via oxicuda), native Apple Metal (gpu-metal, f32, via oxicuda-metal, macOS only), a portable WebGPU/Metal/Vulkan/DX12 path (gpu-wgpu, f32, via crate::wgpu_forward), and the always-available CPU path (f64). gpu_backend picks the best one present at runtime, in the order CUDA → Metal → wgpu → CPU — CUDA first for its f64 precision and existing tuned kernels, native Metal next on Apple hardware, wgpu for portability elsewhere, CPU as the universal fallback.

Enums§

GpuBackend
A compute backend for the EML forward pass.

Functions§

gpu_backend
Select the best available forward-eval backend at runtime: CUDA → Metal → wgpu → CPU.