As discussed with @rahulporuri and @ansh I will be working on building a generalisable pipeline for enabling ROCm support on consumer GPUs. Mr. Bhooshan Agalgatti, Sr. Director at Nvidia is the industry mentor for this project. I will keep track of my progress with milestones in this thread. The entire process is being documented at my Substack under CC-BY-SA 4.0, and any miscellaneous code I write (for benchmarking / plotting / etc.) will be provided under GPL-v3 at the project’s GitHub repo. I wish to upstream all of my work, however if it is rejected (AMD intentionally doesn’t support these GPU targets), I plan to open source my work and create an automated CI/CD pipeline which will build and publish custom ROCm / PyTorch with my patches. I have already written 6 articles, hope you’ll enjoy them : ) (#1 #2 #3 #4 #5 #6).
Completed milestones:
- Native ROCm 6.4.4 on gfx90c
- HIP hello-world on gfx90c
- GPU programming article serving as educational groundwork for the rest of the project.
- gfx900 spoofing on gfx90c was tested successfully.
- Spoofing benchmarks demonstrating that spoofing works, but is not production-grade.
- rocm-examples subset benchmarked on gfx90c
- Packaging/path issues with ROCm from Fedora were resolved to run benchmarks.
Latest completed milestone:
Failure analysis of benchmark results from running 113 tests from rocm-examples on gfx90c
Pending
- Compile rocm-examples from source and compare against Fedora-packaged binaries
- Resolve each failing case for rocm-examples
- Port gfx900-targeted assembly / kernels to gfx90c where needed
- Write explainer articles for GPU internals — GPU assembly, Vega ISA, SGPRs, scratch, memory, scheduling, LDS, LLVM AMDGPU, etc.
- Update rocBLAS library for gfx90c by adding the missing kernels
- Generate Tensile data for gfx90c
- Update any other incompatible libraries to add compatibility for gfx90c
- Compile ROCm 6.4.4 with patched components and ensure native HIP execution on gfx90c
- Port HIPify/runtime fixes for gfx90c
- Benchmark real-world HIP workloads natively on gfx90c vs spoofing gfx900
- Compare native gfx90c, Mojo, ZML, and other universal runtimes
- Port PyTorch Docker images to gfx90c by modifying bundled ROCm
- Port native PyTorch to gfx90c by modifying bundled ROCm
- Repeat the full process on gfx902
- Evaluate TheRock as a cleaner build path
- Test whether bleeding edge ROCm 7.1 can be ported
- CI/CD pipeline for automatic ROCm / PyTorch / Dockerized PyTorch builds
I am trying to publish 2-3 articles a week, but due to the experimental nature, I get stuck sometimes.