decuda not working for cuda 3.0 cubin files?

I’ve used decuda to extract gpu assembly instructions from g80 cubin files on cuda sdk 2.3 and it worked flawlessly. However when I try to decuda a program compiled using cuda sdk 3.0, I got the following error:

Traceback (most recent call last):

  File "/.../decuda-0.4.2/decuda", line 89, in <module>

	main()

  File "/.../decuda-0.4.2/decuda", line 52, in main

	cu = load(args[0])

  File "/.../decuda-0.4.2/CubinFile.py", line 255, in load

	inst = [int(x,0) for x in inst]

ValueError: invalid literal for int() with base 0:

I know decuda only work for G80/G90 gpus and I used -arch=sm_11, but it did not help.

Anyone got any ideas on this?

Thanks!

Didn’t they change the binary format to ELF with 3.0? Or was it only for Fermi?

http://forums.nvidia.com/index.php?showtopic=172577

Thanks so much, your scripy is exactly what I need!

However, when I try to apply it to some of the kernels I’m exploring, I got following error:

Traceback (most recent call last):

  File "/.../decuda-0.4.2/elfToCubin.py", line 431, in <module>

	cubin = parse_objdump(output,code,arch)

  File "/.../decuda-0.4.2/elfToCubin.py", line 217, in parse_objdump

	raise ValueError("Got unexpected line in state INKERNEL\n%s"%line)

ValueError: Got unexpected line in state INKERNEL

a000 05020230 800710c4 05d40020 80472004  ...0....... .G .

It’s compiled using --arch=sm_13 under cuda 3.0.

Any ideas?

Thanks again!

Could you email me the CUBIN file (my address is at the top of the script)? I’ll try to have a look - must be some logic bug in the parser.

I’ve fixed the bug. The version of the script on the web has been updated.