Search code examples
linuxcudagpunvccptx

Understanding cuobjdump output


I already read about virtual architecture and code generation for nvcc but I still have some questions.

I have a cuda compiled executable whose cuobjdump output is

Fatbin elf code:
================
arch = sm_20
code version = [1,7]
producer = cuda
host = linux
compile_size = 64bit

Fatbin ptx code:
================
arch = sm_20
code version = [5,0]
producer = cuda
host = linux
compile_size = 64bit
compressed

I have two questions:

  1. What does code version mean? Documentation doesn't say that.
  2. Would such an executable be compatible on a system with a sm_30 (Kepler) device? I believe it should because there's PTX code in the executable and the virtual architecture is sm_20, i.e. it's asking for a very small set of features available from Fermi cards onward (still not sure what that code version means)

Solution

    1. What does code version mean? Documentation doesn't say that.

    It means the version of the fatbin element it is printing -- elf version 1.7 and PTX version 5.0 respectively (see here for PTX versions)

    1. Would such an executable be compatible on a system with a sm_30 (Kepler) device?

    Yes. The presence of the PTX (version 5.0) means the code can be JIT compiled by the driver to assembler to run on a compute capability 3.0 device (again documentation here)