Last updated: 2026-07-19
CUDA Runtime
Loadtest Cuda
Standalone load-test for src/model/loader_cuda.zig.
Drives only the CUDA loader path: select the best device, mmap + parse a GGUF, upload every tensor to the GPU, and report the parsed config, the tensor count, GPU free-mem before/after (to confirm ~model-size uploaded), a spot-check of 3 tensors, and a CPU embedding-row dequant. Independent of forward_cuda / gpu dispatch so the loader can be validated on its own.
Rooted at src/ (module path) so it can import both model/* and cuda/* — exactly like src/main.zig. The whole thing is one Zig module, which keeps the loader's internal `../cuda/*` imports resolvable.
Build + run (on the box): cd ~/zinc5090 && CUDA_HOME=/usr/local/cuda \ ~/zig-0.15.2/zig build cuda-loadtest -Dbackend=cuda -- <model.gguf>
1 exports shown
function
main
pub fn main() !void Load a GGUF onto the GPU via loader_cuda and print a structured report.
surfaces a nonzero exit on failure.