As of January 2026, the (free) Google Collab Tesla T4 runtime has a slight mismatch between the max supported CUDA version in the driver and what nvcc outputs by default.
Thus, the notebook as-is as of today, runs:
%%shell
nvcc add.cu -o add_cuda
./add_cuda
...this will (silently) fail with the kernel failing to launch. (using CUDA error functions will reveal a PTX mismatch)
change the cell to:
%%shell
nvcc -arch=sm_75 add.cu -o add_cuda
./add_cuda
...and it will work.
As of January 2026, the (free) Google Collab Tesla T4 runtime has a slight mismatch between the max supported CUDA version in the driver and what nvcc outputs by default.
Thus, the notebook as-is as of today, runs:
%%shell
nvcc add.cu -o add_cuda
./add_cuda
...this will (silently) fail with the kernel failing to launch. (using CUDA error functions will reveal a PTX mismatch)
change the cell to:
%%shell
nvcc -arch=sm_75 add.cu -o add_cuda
./add_cuda
...and it will work.