Registers usage

I would like to know how I can see the register usage

the option should be

–ptxas-options=-v

but if I launch

nvcc -m32 --ptxas-options=-v -ptx H:\WorkSpace\CudaImplementation.cu -o H:\WorkSpace\CudaImplementation.ptx

I get no info, just the normal .ptx

Instead if I launch

nvcc -m32 --ptxas-options=-v H:\WorkSpace\CudaImplementation.cu

I get the info but I get also an error

LINK : fatal error LNK1104: cannot open file ‚kernel32.lib‘

And I do not get the ptx obviously :confused:

Therefore I would like to know which is the proper way (this is valid also when I want to add any special option like -prec-div=true for more precise divisions for example…)

i wasnt able to figure it out either, so i just compiled it with the “error” which gave me the infos i needed

Although I can’t imagine why it should need the kernel32.lib, just a quick guess: It should be possible to pass the path to the lib as an additional argument
nvcc … -L"C:\Path\To\Kernel\Lib" …

If using one command to obtain the info, and the other command to create the PTX is not a feasilble option, I can try to reproduce the error later and see whether I find a solution.

[QUOTE=Marco13]Although I can’t imagine why it should need the kernel32.lib, just a quick guess: It should be possible to pass the path to the lib as an additional argument
nvcc … -L"C:\Path\To\Kernel\Lib" …

If using one command to obtain the info, and the other command to create the PTX is not a feasilble option, I can try to reproduce the error later and see whether I find a solution.[/QUOTE]

No, dont worry, it is totally feasible

I just care now how I can compile with some special options (like --prec-div=true)