I am also using gcc 12.3 and g++ 12.3. Whenever I compile and run my cuda code, the kernel never executes and I get the error text “the provided PTX was compiled with an unsupported toolchain.”. All I do to compile the code is “nvcc kernel.cu”.
make sure the CUDA version reported by nvidia-smi is greater than or equal to the CUDA version reported by nvcc --version
In the particular case, rs277 has already steered you to the right place. CUDA 13.3 just came out, so you should update your GPU driver to the latest available.