Skip to content

Maxritz/rocm_sdk_builder

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROCm 7.2 RDNA2 Support

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


Quick Start

1. Clone This Repository

git clone https://github.com/Maxritz/rocm_sdk_builder.git
cd rocm_sdk_builder
git checkout rdna2-support  # Use the RDNA2 branch

2. Clone ROCm 7.2 Sources

# 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 list

3. Apply Patches

cd ~/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...

4. Copy Optimization Headers

# Composable Kernel needs special headers
cp patches/rocm-7.2.0/composable_kernel/*.hpp \
   src/composable_kernel/include/ck/utility/

5. Set Environment

export HSA_OVERRIDE_GFX_VERSION=10.3.1
export ROCM_PATH=/opt/rocm
export GPU_TARGETS="gfx1031"  # Or gfx1030/gfx1032

6. Build

cd ~/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

What's Included

Patches (15 libraries)

  • Core ML: MIOpen, rocBLAS, Composable Kernel, Tensile
  • Math: rocSPARSE, rocFFT, rocSOLVER
  • Primitives: rocPRIM, rocRAND, rocThrust (native support)
  • HIP Wrappers: hipBLAS, hipCUB, hipFFT, hipRAND

Optimization Headers

  • rdna2_wmma_emulation.hpp - Wave Matrix Multiply emulation
  • rdna2_fp8_fallback.hpp - FP8→INT8 conversion
  • rdna2_vgpr_segmentation.hpp - Register management

Documentation

  • QUICK_START.md - Fast setup guide
  • BUILD_GUIDE.md - Complete build instructions
  • LIBRARY_LIST.md - All ROCm libraries and dependencies
  • TROUBLESHOOTING.md - Common issues and solutions

Automated Scripts (Optional)

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.sh

Verification

After 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

Supported GPUs

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

Known Limitations

  • FP8 operations converted to INT8 (RDNA2 lacks native FP8)
  • Some WMMA kernels emulated (~10-15% performance impact)
  • Requires HSA_OVERRIDE_GFX_VERSION=10.3.1 environment variable

Contributing

  • Report issues on GitHub
  • Share build results for other RDNA2 GPUs
  • Submit performance benchmarks

Test for Miopen on My system

rocm_performance_benchmark

License

Follows ROCm project licenses (MIT/Apache 2.0)


Credits

Based on community RDNA2 patches, adapted for ROCm 7.2.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 73.8%
  • Shell 26.2%