CUDA 3.0 cubin files how to extract information for the occupancy calculator

Hi all,

I’ve just installed CUDA3.0 and it looks that the .cubin file format changed. How can I get the information that was previously stored in cubin files (shared mem, local mem, #regs, etc)?

I looked into the new .cubin files with the objdump, but couldn’t find this info. Is there maybe some switch to make it visible?

Thanks,
Ana

nvcc --ptxas-options=-v (from memory) gives the same information

thanks, it worked :)

Are you compiling it on Linux? How can you make this file visible on windows (using Visual Studio)?

It isn’t a file, it is just some additional output the ptx assembler prints during compilation. Like this:

avidday@cuda:~/code/columnsum$ nvcc -c -arch=sm_13 -Xptxas -v columnsum.cu

ptxas info	: Compiling entry function '_Z18columnsumreductioniiPdS_' for 'sm_13'

ptxas info	: Used 11 registers, 32+16 bytes smem, 36 bytes cmem[1]

ptxas info	: Compiling entry function '_Z14columnsumnaiveiiPdS_' for 'sm_13'

ptxas info	: Used 8 registers, 32+16 bytes smem, 4 bytes cmem[1]

You probably should be able to run the same thing in a Windows command tool window.

You are right dear avidday! the information is in the output window on VS.
But what about those directions in the help section of CUDA Occupancy Calculator. it says that the information of registers, shared mem, etc. are in the *.cubin file!!

Well, they were in the cubin file before CUDA 3.0, and you can make nvcc compile a cubin file for you using nvcc -cubin … if you want. But in CUDA 3.0, there was a switch from the ascii format cubin layout CUDA used to use to ELF, so the cubin files are no longer human readable, and unless you have something like cygwin installed, you probably won’t have the tools to examine an elf file under windows (or maybe you will, I don’t use windows much and don’t know anything about the toolchain).

Thanks avidday! you are a great teacher :shifty: . maybe I should switch to Linux to get rid of all these troubles! :confused: