ROCm/HIP Installation and Runtime Issues on Windows with Radeon GPU
Opened this issue · 0 comments
7shi commented
I'm experiencing issues with different versions of HIP on Windows with a Radeon GPU.
stable_diffusion_cpp_python: 0.1.9
- HIP 5.5.1 and 5.7.1 can be made to work with a manual fix (copying DLL)
- HIP 6.1.2 fails to detect the device during runtime
Common Installation Steps
set CMAKE_ARGS=-G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DSD_HIPBLAS=ON -DCMAKE_BUILD_TYPE=Release -DAMDGPU_TARGETS=gfx1102
pip install -v stable_diffusion_cpp_python
HIP 5.5.1 and 5.7.1
The build process completes successfully, but the subsequent installation fails with the following error during pip install
.
CMake Error at C:/Users/7shi/AppData/Local/Temp/tmpu0by5lhz/build/cmake_install.cmake:114 (file):
file INSTALL cannot find "C:/Program Files/AMD/ROCm/5.5/bin/amdhip64.dll":
File exists.
The error can be resolved by manually copying C:\Windows\System32\amdhip64.dll
to C:\Program Files\AMD\ROCm\5.5\bin
. After applying this fix, the installation succeeds and the software functions properly.
HIP 6.1.2
Installation completes without errors, but the device is not detected during runtime.
CUDA error: no ROCm-capable device is detected
current device: -1, in function ggml_cuda_init at C:/Users/7shi/AppData/Local/Temp/pip-install-9l1lu57t/stable-diffusion-cpp-python_948037fe5d384d538766e754939be40a/vendor/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:158
hipDeviceSynchronize()
C:/Users/7shi/AppData/Local/Temp/pip-install-9l1lu57t/stable-diffusion-cpp-python_948037fe5d384d538766e754939be40a/vendor/stable-diffusion.cpp/ggml/src/ggml-cuda.cu:102: CUDA error
The environment variable HIP_VISIBLE_DEVICES
is not set. No known workaround for HIP 6.1.2 at this time.