| |
When a CUDA kernel is executed, the nvcc compiler translates the program through multiple stages: host code goes to a standard C compiler, while device code passes through cicc (which generates PTX, a virtual instruction set) and then ptxas (which converts PTX to SASS, the actual GPU machine code). The article traces how a simple vector addition kernel gets compiled, explaining that PTX uses generic virtual registers and is device-agnostic, requiring extra instructions like cvta.to.global to handle generic pointers before they can be efficiently executed on the hardware.
Read Full Article →
← More Tech news