Last updated: 2026-07-19

CUDA Runtime

Smoke

All API Sections

Standalone smoke test for the ZINC CUDA backend Zig wrapper layer. Drives the GPU entirely through device.zig / buffer.zig / pipeline.zig / command.zig (which wrap cuda_shim.c) — proving the Zig<->CUDA seam: device select, staged buffers + H2D/D2H, NVRTC runtime compile, the buffers+push dispatch ABI, and both sync and async commit paths.

Build (on the box): ~/zig-0.15.2/zig build-exe smoke.zig cuda_shim.c \ -I. -I/usr/local/cuda/include -lc \ -L/usr/local/cuda/lib64 -L/usr/lib/wsl/lib -lcuda -lnvrtc \ -rpath /usr/local/cuda/lib64 -femit-bin=smoke_zig

1 exports 0 methods src/cuda/smoke.zig

1 exports shown

function

main

#
pub fn main() !void

Run the CUDA Zig<->shim smoke test end to end and report PASS/FAIL.

Selects the best device, then exercises the full seam: a `vadd` kernel via the synchronous commit path and a `dp4a` kernel via the async commit path, checking both results.

Returns

`error.SmokeFailed` if any computed value mismatches its expected output.

src/cuda/smoke.zig:37