With CuObjDump SASS can be generated from Cubin file using
cuobjdump -sass <input file>
, But is there any way to convert the SASS back to Cubin.
-
2The one word answer is, I believe, no.– talonmiesCommented Jun 10, 2016 at 7:14
-
1If you are asking if there is a tool that will take code written in SASS and turn it into something that is executable, that would basically be a SASS assembler, and NVIDIA provides no such tools (the lowest NVIDIA supported toolchain is PTX), but you may want to take a look at the maxas assembler.– Robert CrovellaCommented Jun 10, 2016 at 17:37
2 Answers
There are no "assemblers" provided as part of the official NVIDIA CUDA toolchain. The NVIDIA toolchain can take CUDA C/C++, or PTX, and convert it to a cubin or other executable format.
However there are some community-developed assemblers:
Perhaps the most recent one at this time (probably the only one worth considering at this time) is maxas.
There also was an older one asfermi developed in the Fermi generation of CUDA GPUs. I don't think it has been updated or maintained.
I would like to add that depending on the architecture (maxwell/kepler etc), you can use a community developed assembler/dissembler to convert the SASS back to Cubin. Here are some:
Maxas: https://github.com/NervanaSystems/maxas
KeplerAs: https://github.com/PAA-NCIC/PPoPP2017_artifact/tree/master/KeplerAs