AsahiLinux / docs

Hardware and software docs / wiki
Other
1.79k stars 50 forks source link

[INFO] Apple GPU LLVM Assembler #2

Open Rastafabisch opened 3 years ago

Rastafabisch commented 3 years ago

This tool might provide some useful information regarding apples GPU hardware. @alyssarosenzweig

https://github.com/tellowkrinkle/mtl-gpu-asmcheck

Feel free to close this "issues", wether useful or not. ;)

TellowKrinkle commented 3 years ago

Please don't use it for this project until people decide where it stands from a cleanroom reverse engineering standpoint

Some notes for anyone making that decision:

All programs in that repo...

mtl-gpu-asmcheck (but not mtl-gpu-llc) also...

If you ask me, I'd say using mtl-gpu-llc to make AGX2 binaries from your Intel Mac is probably okay, but I have no clue about using mtl-gpu-asmcheck to get scheduling information

marcan commented 3 years ago

I need to run this by Alyssa, but a priori:

TellowKrinkle commented 3 years ago

I updated the code to not print scheduling info by default

I previously lumped these into "scheduling information", but thoughts on printing...

Also, thoughts on messing with the instruction stream to see what encodings for similar instructions are (e.g. compiler says "output op3 R3, 0" but we call the code emitter on op3 R0, 0, op3 R1, 0, etc to see how the first operand is encoded into the instruction. Note that this can reveal additional information like which registers the code emitter considers valid for a given instruction)