Short answer: bcs paranoid nvidia don't disclose its ABI (and punishes you silently when you get them wrong)
Indeed, their ISA is known but I know only couple of nominally functional assemblers for modern SM (given that their nvasm_internal used for many RT kernels remains private and not available)
CuAssembler
Unnamed asm from nvidia-sass-document
LDC.64 {R0,R1}, #param(data);[7:7:{{}}:5:1] - ambiguity for wide operands
- part after semicolon describes explicit scheduler settings like usched_info, req_bit_set etc (like in good old maxas)
I think that having own syntax is bad idea generally. Currently the only trusted source of SASS asm is official nvdisasm and so we should at least has capability to parse it and then automatically compare to assure that our encoder/decoder works
Let's classify what problems can arise if our generated CUBIN missed or malformed some data
- CUBIN won't loading. Difficulty: easy, you can always compare with generated by ptxas and find out what is wrong
- CUBIN loading but some tools (like cupti, nsight, memcheck/synccheck) refused to work with it. Difficulty: easy, see previous point
- CUBIN loading but fails in some rare edge-cases. Difficulty: medium, but can be hard if we can't use cuda-gdb
- CUBIN loading and successfully working, but due to some missed data (for example for scheduler) at not optimal performance. As usually nvidia doing this totally silently - no logs/messages from driver. Difficulty: nightmare, such cases extremely hard to detect
And now lets list what must be generated to get good & wealthy CUBIN - keep in mind that this set is incomplete