I’m trying to install xformers with ROCm support inside a conda shell. The pre-built packages do not seem to support ROCm, so I’m trying to build xformers from source. I’ve made a bit of progress, but I’m now getting stuck on error messages like this:
clang++: error: cannot find ROCm device library; provide its path via '--rocm-path' or '--rocm-device-lib-path', or pass '-nogpulib' to build without ROCm device library
clang++: error: cannot find HIP runtime; provide its path via '--rocm-path', or pass '-nogpuinc' to build without HIP runtime
clang++: error: cannot find HIP runtime; provide its path via '--rocm-path', or pass '-nogpuinc' to build without HIP runtime
The problem is that all ROCm libraries are usually installed together in /opt/rocm, but Nix obviously doesn’t install the libraries there. I’ve tried setting it to the rocm runtime directory in the store, but then it also expects to find hipcc there, which causes an error like this:
/bin/sh: line 1: /nix/store/637pjyhpg2lyw57pzx7d5jr01f5bxmid-rocm-runtime-5.7.1/bin/hipcc: No such file or directory
What can I do to fix this problem?
Edit: I see the torchWithRocm
package sets ROCM_PATH
to rocmtoolkit_joined
:
But how do I use this myself?