To build for the AMD GPU, you need to have the ROCM SDK installed. See below for the versions that we have tested.
A minimum g++ version as listed below is required due to libtorch. You check check your g++ version as g++ --version.
Install zlib development files needed for slow5lib:
On Debian/Ubuntu : sudo apt-get install zlib1g-dev
On Fedora/CentOS : sudo dnf/yum install zlib-devel
Clone the slorado repository recursively
git clone --recursive https://github.com/BonsonW/slorado
cd slorado
Run the script that downloads and extracts torchlib.
scripts/install-torch2.sh rocm
This will download the torch version marked default in table below.
You can specify a different torch version in this table, for example scripts/install-torch2.sh rocm 2.2.0.
Call make
make rocm=1 -j cxx11_abi=1
Note that if the particular torch version in table below states “no” for cxx11_abi, you should invoke as make cuda=1 -j
See the slorado version
./slorado --version
/opt/rocm). You should have hipcc at /opt/rocm/bin/hipcc and the library files (.so files) at /opt/rocm/lib. If your ROCM is installed elsewhere, you can specify the path manually as:
make rocm=1 ROCM_ROOT=/path/to/rocm/
Make sure you have hipcc at /path/to/rocm/bin/hipcc and the library files at /path/to/rocm/lib.
You can provide the ROCM architecture as make rocm=1 ROCM_ARCH=--offload-arch=gfxnnn
make LIBTORCH_DIR=/path/to/libtorch
make cxx11_abi=1
make zstd=1. This requires zstd 1.3 development libraries installed on your system (libzstd1-dev package for apt, libzstd-devel for yum/dnf).Note that we have tested compilation on a limited number of combinations and the minimum g++ requirements are as below.
| Slorado version | tested libtorch | tested ROCM | minimum g++ (approximate) | cxx11_abi | comments |
|---|---|---|---|---|---|
| 0.4.0-beta | 2.2.0 | 5.7 | 8.5 | no | Flash Attention and Fused RMSNorm layer unsupported for SUP >= v5.0.0 |
| 0.4.0-beta | 2.9.0 (default) | 6.3 | 9 | yes | |
| 0.3.0-beta,0.2.0-beta | 2.2.0 | 5.7 | 8.5 | no |