Welcome to the rocm-loongarch repository, a community-driven project hosted under the loongarch-moe organization. This repository contains patches and software packages for adapting the ROCm software stack to support GPUs on the LoongArch architecture. The work primarily focuses on supporting AMDGPU and enabling high-performance GPU computing on LoongArch.
The rocm-loongarch project provides the following stages of adaptation for running the ROCm software stack on LoongArch-based systems:
- Enabling HSA_AMD driver support
- Switching to 4KB page size
Basic ROCm infrastructure packages:
rocm-corerocm-llvm-corerocm-llvm-clangrocm-llvm-compiler-rtrocm-llvm-lldrocm-llvm-extra
rocm-rocprofiler-registerrocm-rocr-runtimerocminforocm-cmakerocm-clrrocm_bandwidth_testrocm-halfrocm_smi_librocm-HIPIFYrocm-rocPRIMrocm-hipCUBmscclpp
rocm-llvm-openmprocm-rocMLIRrocm-llvm-mlirrocm-llvm-flangrocm-hipfortrocm-rocJPEGrocm-pgmathrocm-flang-classicrocm-rocDecode
rocm-hipBLAS-commonrocm-hipBLASLtrocm-rocBLASrocm-rocFFTrocm-rocRANDrocm-rcclrocm-rocSPARSErocm-hipFFTrocm-hipSPARSErocm-rocSOLVERrocm-hipBLASrocm-hipRANDrocm-hipSPARSELt
rocm-hipSOLVERrocm-rocThrustrocm-rocALUTIONrocm-composable_kernelrocm-MIOpenrocm-ROCdbgapi
stable-diffusion.cpppytorch-rocm(in progress)pytorch-cpullama.cppcupyaotriton
For a detailed introduction to ROCm, including its components and architecture, you can refer to the AMD ROCm documentation.
Here is the recommended relationship between kernel versions and RDNA generations:
- Kernel version 6.14 + rx9070_rdna4_fpu.patch: 4K page size support for RDNA4 serial.
- Kernel version 6.8 and above: 4K page size support for RDNA2/3 serial.
- Kernel version below 6.8: 4K/16K page size support for RDNA2 serial.
| GPU Architecture | Shader ISA | Support | Need PCIe Atomics? | Need HSA_OVERRIDE? |
|---|---|---|---|---|
| GCN 4.0 | gfx80x | No | ||
| GCN 5.0 | gfx900/1 | Unknown | ||
| GCN 5.1 | gfx906/7 | Unknown | ||
| CDNA 1.0 | gfx908 | Unknown | ||
| CDNA 2.0 | gfx90a | Unknown | ||
| CDNA 3.0 | gfx940/2 | Unknown | ||
| RDNA 1.0 | gfx101x | Unknown | ||
| RDNA 2.0 | gfx1030 | Yes | No | |
| RDNA 2.0 | gfx103x | Yes | No | 10.3.0 |
| RDNA 3.0 | gfx110x | Yes | No | |
| RDNA 3.5 | gfx115x | No(iGPU only) | ||
| RDNA 4.0 | gfx120x | Unknown |
For the latest releases of the software and packages, please visit the Releases page.
We welcome contributions to this project. If you're interested in improving or extending the support for ROCm on LoongArch, please feel free to fork the repository, submit issues, and create pull requests.
- Ensure that your changes are well-tested and documented.
- Follow the standard coding conventions for ROCm and LoongArch development.
For any questions or issues, feel free to open an issue in the repository, or reach out to the maintainers via GitHub Discussions.