2

To check the assembly code in a normal project I simply go change the

Property in Project Properties->ConfigurationProperties->C/C++->Output Files->Assembler Output to Assembly-Only Listing (/FA)

But in CUDA projects I can't find this option available: enter image description here

So how can I have access to the assembly generated code? I want to the see the release code so I can't use the debugger.

user3023605
  • 459
  • 5
  • 11
  • 1
    This answer provides some background: http://stackoverflow.com/questions/7353136/is-there-an-assembly-language-for-cuda. The assembler is not x86 (it's specific to the GPU processor) so CUDA tends to be directly compiled to the object code. As far as Debugging goes, Nvidia has their own debugger plugin for VS: https://developer.nvidia.com/nvidia-nsight-visual-studio-edition – Erik Nedwidek Sep 11 '14 at 19:04

1 Answers1

2

Locate the generated executable, say StackOverflow.com, go to that directory and type

cuobjdump StackOverflow.com --dump-sass

This will show the disassembly of all the compiled kernels. The assembly primitives are reported in the CUDA Binary Utilities guide.

Vitality
  • 20,705
  • 4
  • 108
  • 146