amdgpu lsp + vs code extension
why are there no amdgpu / rdna development tools?
I’ve started learning RDNA (AMD’s GPU architecture). While doing that, I realized there’s basically no LSP / autocomplete for RDNA/CDNA instructions. I kept having to flip back to the RDNA 3.5 ISA doc every time I wanted to check operand names, argument types, or even what an instruction was called.
So I wrote one: https://github.com/boopdotpng/amdgpu-lsp
Codex and Claude Code have gotten really good over the second half of this year. The days of yelling at an LLM because it got something totally wrong are mostly over. Now it barely makes mistakes if you give it clear enough instructions. AMD also helpfully publishes per-architecture XML that includes instructions, operands, and operand types, which made this project pretty straightforward.
Also, Codex’s rate limits feel infinite. I’m only on the Plus plan and I’ve never gone over 50%. You only get to chat with Opus once an hour!
If you want an easy way to write and run RDNA, I wrote this: https://github.com/boopdotpng/rdna-playground
You can write a HIP file, inspect the disassembled RDNA, or write and run your own kernels using tinygrad’s AMD driver. Eventually you’ll also be able to compare your RDNA kernel to the one generated by tinygrad.
Rough roadmap:
- Finish the LSP (almost done)
- Write basic kernels in RDNA and get familiar with the RDNA 3.5 documentation
- Try to beat existing tinygrad kernels with handwritten RDNA ones
- Write an RDNA simulator that compiles to WASM
- Write an RDNA book (like the Rust Book) that teaches RDNA: https://doc.rust-lang.org/book/
- Finish this tinygrad bounty: RDNA3 assembly backend within 10% of perf vs HIP (see speed_compare_cuda_ptx for compare style)