Found during stage-9.1 GPU validation (PR #3951 evidence trail, Anvil A100).
The CUDA example Makefiles pass no -arch to nvcc, so objects carry only nvcc's default fatbin (currently sm_75 cubin+ptx — verified with cuobjdump on helloCUDA.o). On an sm_80 A100, a kernel from such an object can end up never executing, with no launch error reported: observed directly — a fill kernel left its buffers untouched (32768/32768 elements wrong), and adding -arch=sm_80 alone took it to 0 wrong. examples/charm++/cuda/hello cannot detect this because its kernel is empty and it verifies nothing.
Two-part fix, pattern already in-tree in tests/charm++/cuda/hapitest (from #3951):
CUDA_ARCH ?= sm_80 (overridable) and -arch=$(CUDA_ARCH) in each CUDA example Makefile;
- a
cudaGetLastError() check after kernel launches in examples that claim to demonstrate real GPU work — and ideally make the examples verify their outputs, since a silent no-op kernel otherwise looks like success.
🤖 Generated with Claude Code
Found during stage-9.1 GPU validation (PR #3951 evidence trail, Anvil A100).
The CUDA example Makefiles pass no
-archto nvcc, so objects carry only nvcc's default fatbin (currently sm_75 cubin+ptx — verified with cuobjdump onhelloCUDA.o). On an sm_80 A100, a kernel from such an object can end up never executing, with no launch error reported: observed directly — a fill kernel left its buffers untouched (32768/32768 elements wrong), and adding-arch=sm_80alone took it to 0 wrong.examples/charm++/cuda/hellocannot detect this because its kernel is empty and it verifies nothing.Two-part fix, pattern already in-tree in
tests/charm++/cuda/hapitest(from #3951):CUDA_ARCH ?= sm_80(overridable) and-arch=$(CUDA_ARCH)in each CUDA example Makefile;cudaGetLastError()check after kernel launches in examples that claim to demonstrate real GPU work — and ideally make the examples verify their outputs, since a silent no-op kernel otherwise looks like success.🤖 Generated with Claude Code