With my current CUDA Fortran program, I’m at the point now where counting registers, lmem, etc., has become important (though whether I can do anything with that info is up to my brain). To that end, I was wondering if there was an equivalent to “–ptxas-options=-v” for pgfortran?
At the moment, I’m using -Mcuda=keepbin in the .bin (cf. .cubin) file to see this, but I was wondering if there was a more…elegant way to get this data (a la the nvcc option).
The short answer is no. However, we have been discussing how to cleanly pass options to the back-end Nvidia tools such as the ptxas assembler. I’ve sent a note to Michael to see where his team is at on this, but he’s out of the office this week. I’ll post a reply once I heard back from him.
Hi Mat,
How can we get the same output (e.g. the amount of registers per kernel, shared memory used per block…) in Fortran CUDA. Is this only available with Accelerator?
Hi Mat,
I tried but the compiler doesn’t recognize the -Mcuda=ptxinfo value. I’m using Fortran 10.5, Tesla C1060. The one available is -Mcuda=keepptx, yet I don’t find out any related information in the generated file nor the output during the compilation stage.
Hmm. This suggests to me you are using the CUDA 3.x toolkit and not the 2.3 (or lower) toolkit since 3.x now uses ELF for .cubin/.bin rather than plain text (necessitating the need for ptxinfo).
Have you changed your default CUDA version?
Also, alternatively, do you get plain text bins if you use:
-Mcuda=2.3,keepgpu,keepbin,keepptx,...
I think this will force pgfortran to use the 2.3 toolkit.
You’re right, I’m using CUDA 3.0. To switch back to 2.3, I need to recompile some shared libraries which are required for the build. Thanks a lot, Matt.