0

According to NVIDIAs Programming Guide:

Source files for CUDA applications consist of a mixture of conventional C++ host code, plus GPU device functions. The CUDA compilation trajectory separates the device functions from the host code, compiles the device functions using the proprietary NVIDIA compilers and assembler, compiles the host code using a C++ host compiler that is available, and afterwards embeds the compiled GPU functions as fatbinary images in the host object file. In the linking stage, specific CUDA runtime libraries are added for supporting remote SPMD procedure calling and for providing explicit GPU manipulation such as allocation of GPU memory buffers and host-GPU data transfer.

  • What does using the proprietary NVIDIA compilers and assembler mean?
  • Also, what is a PTX and a cubin file? and in which step of compilation do these take place?
    I have searched a lot about this concept but, i would like a simple explanation
talonmies
  • 70,661
  • 34
  • 192
  • 269
enrique
  • 1
  • 3

1 Answers1

1

The nvcc documentation explains the different compilation steps and their respective compilers. https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#cuda-compilation-trajectory

Cubin files contain the "real" sass assembler code, whereas ptx files contain assembler code for a "virtual" GPU architecture.

CUDA compilation trajectory

Abator Abetor
  • 2,345
  • 1
  • 10
  • 12