Search code examples
parallel-processingcudacompiler-optimization

How important instruction scheduling for PTX?


As i understand, the main advantage of PTX to give you access couple of specific instructions. It is also intermediate level programming language. It means, nvidia compiler doesn't execute straight PTX code. It re-compile PTX codes into hardware specific assembly.

When we consider these all terms, In short, I'm wondering is there any effects of PTX instruction scheduling? Also if we re-schedule PTX code, can we obtain performance or can see any effects?

Thanks in advance


Solution

  • The final arbiter of instruction scheduling is the CUDA driver, which contains an optimizing compiler that translates PTX to microcode for your GPU. If instruction scheduling is the only benefit that you anticipate from using PTX, you aren't going to get much return on your investment. It may even be counterproductive by confusing the heuristics used by the compiler in the CUDA driver.