Complete patch set enabling RDNA2 GPUs (RX 6900/6800/6700/6600 series) on ROCm 7.2.
BUILT FOR My AMD Radeon RX 6700 XT (gfx1031) Test and modify as needed* Built with antigravity and a lot of effort and time* Supports: gfx1030, gfx1031, gfx1032
git clone https://github.com/Maxritz/rocm_sdk_builder.git
cd rocm_sdk_builder
git checkout rdna2-support # Use the RDNA2 branch# Create workspace
mkdir -p ~/rocm-build/src
cd ~/rocm-build/src
# Clone required libraries (minimum for testing)
git clone --branch rocm-7.2.0 --depth 1 \
https://github.com/ROCmSoftwarePlatform/composable_kernel.git
git clone --branch rocm-7.2.0 --depth 1 \
https://github.com/ROCmSoftwarePlatform/MIOpen.git
git clone --branch rocm-7.2.0 --depth 1 \
https://github.com/ROCmSoftwarePlatform/rocBLAS.git
# See LIBRARY_LIST.md for complete listcd ~/rocm-build
cp -r /path/to/rocm_sdk_builder/patches .
# Apply patches to each library
cd src/composable_kernel
git apply ../../patches/rocm-7.2.0/composable_kernel/*.patch
cd ../MIOpen
git apply ../../patches/rocm-7.2.0/MIOpen/*.patch
cd ../rocBLAS
git apply ../../patches/rocm-7.2.0/rocBLAS/*.patch
# Repeat for other libraries...# Composable Kernel needs special headers
cp patches/rocm-7.2.0/composable_kernel/*.hpp \
src/composable_kernel/include/ck/utility/export HSA_OVERRIDE_GFX_VERSION=10.3.1
export ROCM_PATH=/opt/rocm
export GPU_TARGETS="gfx1031" # Or gfx1030/gfx1032cd ~/rocm-build/src/composable_kernel
mkdir build && cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=$ROCM_PATH \
-DGPU_TARGETS="$GPU_TARGETS" \
-DBUILD_SHARED_LIBS=ON
make -j$(nproc)
sudo make install- Core ML: MIOpen, rocBLAS, Composable Kernel, Tensile
- Math: rocSPARSE, rocFFT, rocSOLVER
- Primitives: rocPRIM, rocRAND, rocThrust (native support)
- HIP Wrappers: hipBLAS, hipCUB, hipFFT, hipRAND
rdna2_wmma_emulation.hpp- Wave Matrix Multiply emulationrdna2_fp8_fallback.hpp- FP8→INT8 conversionrdna2_vgpr_segmentation.hpp- Register management
QUICK_START.md- Fast setup guideBUILD_GUIDE.md- Complete build instructionsLIBRARY_LIST.md- All ROCm libraries and dependenciesTROUBLESHOOTING.md- Common issues and solutions
If you want to automate the process:
# Copy build scripts from this repo
chmod +x build_rocm72_rdna2.sh test_build_ck.sh
# Test build (Composable Kernel only, ~20 min)
./test_build_ck.sh
# Full build (all libraries, ~3-5 hours)
./build_rocm72_rdna2.shAfter building, verify it works:
export HSA_OVERRIDE_GFX_VERSION=10.3.1
rocminfo | grep gfx
# Should show: gfx1031 (or your GPU)
# Test HIP
cat > test.cpp << 'EOF'
#include <hip/hip_runtime.h>
#include <iostream>
int main() {
hipDeviceProp_t props;
hipGetDeviceProperties(&props, 0);
std::cout << "GPU: " << props.gcnArchName << "\n";
return 0;
}
EOF
hipcc test.cpp -o test
./test
# Should print: GPU: gfx1031| GPU | Architecture | Status |
|---|---|---|
| RX 6900 XT | gfx1030 | ✅ Supported |
| RX 6800 XT | gfx1030 | ✅ Supported |
| RX 6700 XT | gfx1031 | ✅ Supported |
| RX 6600 XT | gfx1032 | ✅ Supported |
| RX 6500 XT | gfx1032 | ✅ Supported |
- FP8 operations converted to INT8 (RDNA2 lacks native FP8)
- Some WMMA kernels emulated (~10-15% performance impact)
- Requires
HSA_OVERRIDE_GFX_VERSION=10.3.1environment variable
- Report issues on GitHub
- Share build results for other RDNA2 GPUs
- Submit performance benchmarks
Follows ROCm project licenses (MIT/Apache 2.0)
Based on community RDNA2 patches, adapted for ROCm 7.2.