Reputation: 319
I know CUDA (not bad), but I do not know PTX, so my questions are:
Upvotes: 0
Views: 1068
Reputation: 2683
From my personal experiences, PTX helps in debugging/inspecting a non-trivial problem. I have done this only once, however. Also, remember that PTX is only the immediate code generated by the compiler, not the actual assembly language being executed on the GPU.
If you really want to look at machine code, which is assembled after PTX, NVIDA provides cuobjdump
. I think PTX has a lot of useful information and good documentation, so learning it would help. However, the general optimization strategies for CUDA include:
For your second question, yes you can write PTX in CUDA via inline PTX. I have never done this though.
Upvotes: 4