Skip to content

redplait/denvdis

Repository files navigation

NVidia sass disassembler. See chaotic and incomplete documentation in my blog

Dependencies

  • ELFIO for ELF files parsing
  • FP16 for rendering fp16 values

I used gcc built-in __uint128_t type, so probably on other platforms it's better to use something like abseil Numeric

As an illustration sub-dir test contains 4 small applications:

ced

sed-like tool for inline patching of sass instructions within cubin files. See details in my blog

Practical example - how to read SR_MACHINE_ID registers

nvd

sass disassembler - of course not a complete replica of nvdisasm (however you can have syntax compatible with nvdisasm with -c option), instead it can show

Also note that original nvdisasm can produce ambigious output

ina

interactive sass assembler

because the instruction can have many forms (for example LDG have 14 and F2FP - 60) I add filtering for forms selection, format is (+|-)letter where letter can be

  • f - floating point imm operand
  • i - integer imm operand
  • C - const bank
  • m - memory ref operand
  • d - desc ref operand
  • u - uniform register

You can reset filters with '!'

You can save your instructions to binary file with -o option

pa

parser of nvdisasm output - some details

You can run "strange loop" to consume output of nvd - for this later must use option -c

By default all 3 trying to load corresponding sm_xx.so from current directory - but you can peek those dir with env var SM_DIR

About

NVidia sass disassembler/inline patcher

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors