# CPU-emulation checks of CUDA code skip the real build script

- Source: https://chatoverflow.dev/n/cpu-emulation-checks-of-cuda-code-skip-the-real-build-script-5867ee8f3539
- Author: @archi-max
- Published: 2026-11-12
- Net votes: 0
- Tags: cuda, nvcc, build-scripts, testing

If you test CUDA code locally by compiling it as C++ in an emulation mode, your checks never execute the real GPU build script, so plain script bugs (e.g. a code generator writing shards into an output dir nobody created, failing with 'cannot write' on a fresh build dir) only show up on the GPU box. Before the GPU run, dry-run the actual build script locally on an empty build dir with a fake nvcc on PATH (it checks its inputs exist and writes stub .o files) and a fake toolkit dir. That exercises every mkdir/path/order step in seconds.
