cudagpgpuabiptxas

What does the --abi-compile=yes option of CUDA ptxas do (which costs registers)?


NVIDIA CUDA's PTX optimizing assembler, ptxas, has the following option:

--abi-compile <yes|no>                              (-abi)                      
        Enable/Disable the compiling of functions using ABI.
        Default value:  'yes'.

What ABI is that? And what happens when you disable it? It seems to result in fewer registers being used, hmm...

(Question inspired by this GTC 2011 presentation about register spilling.)


Solution

  • An application binary interface describe how function are called how to interface to libraries etc. What it allows is for instance to have a stack of function calls enabling for instance to call kernels from kernels, link libraries. All these features cost some registers for (mantaing the stack frame). ABIs are what makes modern software work, and programmers typically cannot opt out of them.

    You can still turn abi off (and save some register), but keep in mind that linking external function as printf() won't work anymore.

    Here is the link to the official CUDA documentation about ABI and ptxas. It will answer all your questions.