feat: add simple ROCm GPU support for RDNA3 (gfx1100-1103) - #23
Conversation
- Add hip_compat.h shim mapping CUDA runtime API to HIP equivalents - Update pinned_tensor.cpp to compile under both nvcc and hipcc - Add ROCm detection in arch.py (is_rocm, get_rocm_gfx_arch, is_gfx11xx_family) - Guard NVIDIA arch checks to return None on ROCm - Skip nvcc version check in _toolchain.py when on ROCm - Add ROCm build path in setup.py (ROCM_HOME, amdhip64, --offload-arch) - Add _hip_cflags() in kernel/utils.py for JIT compilation on ROCm - Add is_rocm() and driver_hip_version() in backend.py - Add rocm-smi fallback in __main__.py for clangd generation - Add TODO(ROCm) for NCCL->RCCL, flashinfer/sgl_kernel ROCm builds, Triton autotune RDNA3 tuning, PDL equivalent, hiprtc JIT cache - Add AMD ROCm classifier in pyproject.toml
|
Could add ROCm support for RDNA4 GPUs as well? |
|
For RDNA4 users, the complete validated adaptation is available on This is the monolithic, runnable RDNA4 snapshot used for validation on an AMD Radeon AI PRO R9700 ( git clone --branch feat/rdna4-rocm --single-branch https://github.com/zihaomu/FreeToken.gitSee the branch's ROCm source-install instructions, including the tested ROCm 7.14 image and For upstream review, the same work is being organized as the standalone foundation #132 and Draft follow-ups #133, #134, #135, and #136. Those PRs are review-sized splits; the branch linked above remains the current single-branch version for RDNA4 users. |
|
Following the base-chain discussion, I have opened a standalone current- |
ROCm support for RDNA3 GPUs
Adds initial ROCm support so FreeToken builds and runs on AMD RDNA3 cards (gfx1100-1103).
Supported GPUs:
What works:
pinned_tensor.cppcompiles under hipcc via a hip_compat.h shim that maps CUDA runtime API to HIPLeft as TODO(ROCm) in the code: