AMDGPU.jl on rolling release distros (Arch): Libraries unavailable
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 344
- Forks
- 79
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 27
Description
Hello, just a quick report and temporary solution. I was getting this issue on Arch:
julia> using AMDGPU
┌ Warning: HSA runtime is unavailable, compilation and runtime functionality will be disabled.
│ Reason: Could not find `libhsa-runtime64` v1 library
└ @ AMDGPU ~/.julia/packages/AMDGPU/FXTo5/src/AMDGPU.jl:181
┌ Warning: LLD is unavailable, compilation functionality will be disabled.
│ Reason: unknown
└ @ AMDGPU ~/.julia/packages/AMDGPU/FXTo5/src/AMDGPU.jl:193
┌ Warning: Device libraries are unavailable, device intrinsics will be disabled.
│ Reason: unknown
└ @ AMDGPU ~/.julia/packages/AMDGPU/FXTo5/src/AMDGPU.jl:205
┌ Warning: HIP library is unavailable, HIP integration will be disabled.
│ Reason: unknown
└ @ AMDGPU ~/.julia/packages/AMDGPU/FXTo5/src/AMDGPU.jl:221
I think this is because the JLLs are still being built for the Julia 1.9 and the latest AMDGPU package, so it is falling back to my native instances of each of these libraries, which are on a later version than what is supported by AMDGPU. The quick fix is just to downgrade the packages to 5.4.3.
In arch, this can be done with the Downgrade package like so:
sudo downgrade rocsparse
sudo downgrade rocblas
sudo downgrade rocsolver
sudo downgrade rocfft
sudo downgrade rocrand
sudo downgrade miopen-hip
sudo downgrade hip-runtime-amd
sudo downgrade rocm-device-libs
sudo downgrade hsa-rocr
sudo downgrade hsakmt-roct
There is definitely a better script, but this one works. It will open a UI and ask which version of each library to downgrade to, then you just go to 5.4.3. It's up to you whether you keep the settings so when you pacman -Syu it doesn't upgrade them by default.
I decided to create an issue instead of updating the docs because:
- I figure people will just google the error message
- I think once the JLLs are built, we won't need to do this anymore.
Also: if anyone has a better downgrade script, feel free to post it.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/AMDGPU.jl around lines 181, 193, 205, and 221, then reproduce the missing-library warnings on Arch with the listed ROCm packages. Trace how the Julia 1.9-era JLLs and native libraries are selected; done means a supported rolling-release setup loads the HSA, LLD, device-library, and HIP dependencies without these warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- hpc, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100