Skip to content

Show PTX and ISA from OpenCL kernel

magnum edited this page Oct 7, 2015 · 5 revisions
  1. Have JtR save a "binary" (actually PTX) of the kernel. This can be achieved by setting DUMP_BINARY environment variable. File name will be kernel's name plus a ".bin" extension, in current directory.
  2. ptxas --gpu-name sm_52 foo_kernel.cl.bin -o foo.o
  3. nvdisasm foo.o > foo.isa

Note: CUDA 7.0 ptxas complained about a 352.21 PTX file having "Unsupported .version 4.3; current version is '4.2'" but that can sometimes be worked around simply by editing it 😎