PTX files

I’m new to the CUDA dev world, and have been given code to look at because it isn’t working on the new GPUs. So, as I’m digging through the files I come across the Compute Capability numbers and the JIT concept. I’m thinking, since the code was working on the 1060s, but doesn’t seem to work on the 2075s, it is probably due to the architectural differences, and I should try the JIT approach to just let the driver do the work at load time.

So, my question is how to I get the NVCC to leave in the PTXs and not finish off?? I’ve not been successful at finding the nvcc manual, so I thought I’d try the forums.

Looking at the output of nvcc --help, I see the following, which you may want to try:

–ptx (-ptx)
Compile all .cu/.gpu input files to device- only .ptx files. This step
discards the host code for each of these input file.

You can also use -keep to retain the intermediate PTX file(s) of an ordinary compilation. The command line flags -keep and -ptx are also mentioned in the nvcc manual.