Files
leleka/gpu/kar

KAR CUDA smoke target

vendor/libkar.h and vendor/libkar.cu are copied unchanged from local koference commit 806d2398ae1daaceb2917242911e5680cbfb3608, paths r08/code/libkar.h and r08/code/libkar.cu. Their SHA-256 values are 1d725069fd2c275423f5db70fb4190e7d51760e0c48a2a5ebe8c91993936ca92 and 331babd2a2f260abb7de602d414edd97399542ec1bccb23ffcdfad69dc0ade28 respectively. Keep these bytes and upstream provenance traceable when making local changes.

On Linux with CUDA 13 and a supported NVIDIA GPU, create a model-free fixture and compare its CPU and GPU decode checksums:

strata-next model smoke-fixture --output /tmp/strata-smoke.kar
cmake -S gpu/kar -B artifacts/kar-gpu-build -G Ninja -DCMAKE_CUDA_ARCHITECTURES=120
cmake --build artifacts/kar-gpu-build --target strata-kar-gpu-smoke
artifacts/kar-gpu-build/strata-kar-gpu-smoke /tmp/strata-smoke.kar smoke.expert 2 30
strata-next model checksum-kar-preview /tmp/strata-smoke.kar smoke.expert 2

An optional fifth argument is an overlay archive. The smoke target opens both archives with payload CRC verification, checks their virtual-F32 source identity and every replacement's name, shape, source dtype, source digest, and source offset, then reserves and decodes the requested tensor from the overlay when it is present there. It prints source=base or source=overlay. For a real overlay, first run strata-next model resolve-kar-overlay --base BASE.kar --overlay OVERLAY.kar: that Rust verifier additionally checks complete archive SHA-256 values and provenance. Keep both files unchanged between resolution and this smoke run. The smoke target alone does not authenticate the archive files against provenance and is not a serving loader.

The smoke program validates the KAR container and payload CRCs, reserves a chosen tensor's compressed level prefix in VRAM, decodes it on a CUDA stream, and reports a warm kernel median over the requested iterations. Compare output_fnv1a64 with the native CPU command above using the selected archive, tensor, and level. This is a kernel smoke measurement, not an end-to-end inference comparison or a model quality result. It does not yet link the decoder into Strata's serving path. Use the original model digest, archive digest, driver/CUDA versions, GPU, tensor, cache state, and iteration count when recording results.