Ptx generated by NVCC is different code from NVRTC

Hi.

I have two questions.

Q1
I would like to compile *.cu to *.ptx.
I have used NVRTC to compile ptx in a few sm versions. (sm_50, sm_52, sm_53)
However, when I tried that in sm_53, the ptx file was empty code.
Compile options of them is the same except for -arch
Do you have any idea what was causes this?

Here is all options

-I/<include directories>
-std=c++11 
-arch compute_xx 
-use_fast_math 
-lineinfo 
-default-device 
-rdc true 
-D__x86_64

Q2
I tried to compile .cu to .ptx using NVCC compiler.
nvcc can generate ptx in all sm version.
But, the ptx generated by NVCC is different code from NVRTC.
Does nvcc has a different compile process from nvrtc?

Here is NVCC compile options.

-I/<include directories>
-std=c++11 
-arch compute_xx 
-use_fast_math 
-lineinfo 
-default-device 
-rdc true 
-m64
-D__x86_64

Thanks.

sm_53 is only on Jetson, you might need a Jetson CUDA toolkit install (aarch64) to target sm_53. nvrtc can retrieve compile errors, did you check for any?

Yes, they are two separate engines.

Thank you @Robert_Crovella .

I just found out about it for the first time. Then there is no need for me to compile sm53. My research was inadequate.

I can’t make ptx of NVCC and NVRTC the same, right?

I don’t know how to do that or guarantee that.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.