Why the ptx option is missing in dropdown menu


I try to find ptx and source/ptx option in nsight compute report’s source page,but I
only find these option in red domain.did I miss any commands while nvcc compiling and generating ncu report?

Hi, @liuliang1

Please try to build with “-G” option to generate debug version binary.

thanks for your reply.but it is not necessary,I can sometimes get the ptx and source/ptx option even though I did not compile with “-G” option. is it necessary?

I am not sure which exactly compiler option controls this.
But once I build debug version sample, the PTX will occur. Please have a try

Since this question isn’t about Nsight Compute but about when PTX is available in the binary and when not, I am moving this to the compiler forum.

To have PTX available for nsight compute, you must compile your executable with switches that will embed PTX in the fatbinary. There are many ways to do this, but a simple approach is to compile with:

-arch=sm_XY

where XY is the X.Y compute capability of the GPU you are running/profiling on. I also recommend compiling with -lineinfo

It should not be necessary to compile with -G and -G has no impact on whether PTX is included in the fatbinary or not.

If you only need to have source code and SASS code correlated in nsight compute, then compile your executable with -lineinfo

For example, for your RTX 6000 Ada GPU, I suggest:

-arch=sm_89 -lineinfo