Prefer to read without ads? Become a member — from $10/month — and support the work. Already a member? Log in to read ad-free on this device.

4.3 cuobjdump

cuobjdump is the utility that may be used to examine the binaries generated by CUDA. In particular, it is useful for examining the microcode generated by nvcc: specify the --cubin parameter to nvcc to generate a .cubin file, then use

cuobjdump --dump-sass <filename.cubin>

to dump the disassembled microcode from the .cubin file.

The complete list of command-line options for cuobjdump is given in Table 4-10.

Option Description

--all-fatbin

(-all)

Dump all fatbin sections. By default, will only dump the contents of executable fatbin; if there is no executable fatbin, dumps the contents of the relocatable fatbin.

--dump-cubin

(-cubin)

Dump cubin for all listed device functions.

--dump-elf

(-elf)

Dump ELF Object sections.

--dump-elf-symbols

(-symbols)

Dump ELF symbol names.

--dump-function-names

(-fnam)

Dump names of device functions. This option is implied if options --dump-sass, --dump-cubin or --dump-ptx are given.

--dump-ptx

(-ptx)

Dump PTX for all listed device functions.

--dump-sass

(-sass)

Dump disassembly for all listed device functions.

--file <filename>

(-f)

Specify names of source files whose fat binary structures must be dumped. Source files may be specified by the full path by which they were compiled with nvcc, by filename only, or by base filename (with no file extension).

--function <function name>

(-fun)

Specify names of device functions whose fat binary structures must be dumped.

--help

(-h)

Print this help information on this tool.

--options-file <file>

(-optf)

Include command line options from specified file.

--sort-functions

(-sort)

Sort functions when dumping SASS.

--version

(-V)

Print version information on this tool.

Table 4-10. cuobjdump command-line options