Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixed Device Libs Not Detected if Not in Project #534

Closed
AbhinavPraveen opened this issue Oct 25, 2023 · 2 comments
Closed

Mixed Device Libs Not Detected if Not in Project #534

AbhinavPraveen opened this issue Oct 25, 2023 · 2 comments

Comments

@AbhinavPraveen
Copy link

AbhinavPraveen commented Oct 25, 2023

If Julia is started (and using AMDGPU) and no project is activated, safe_exec (called from src/discovery/discovery.jl) calls this command:

/home/me/julia/julia-1.10.0-beta3/bin/julia -Cnative -J/home/me/julia/julia-1.10.0-beta3/lib/julia/sys.so -g1 --startup-file=no --project=/home/me/.julia/packages/AMDGPU/zf490/ --threads=1 -e 'push!(LOAD_PATH, "/home/me/.julia/packages/AMDGPU/zf490/");import ROCmDeviceLibs_jll; println(ROCmDeviceLibs_jll.bitcode_path)'
ERROR: ArgumentError: Package ROCmDeviceLibs_jll [873c0968-716b-5aa7-bb8d-d1e2e2aeff2d] is required but does not seem to be installed:
 - Run `Pkg.instantiate()` to install all recorded dependencies.

Stacktrace:
  [1] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1920
  [2] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1806
  [3] #invoke_in_world#3
    @ Base ./essentials.jl:921 [inlined]
  [4] invoke_in_world
    @ Base ./essentials.jl:918 [inlined]
  [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1797
  [6] macro expansion
    @ Base ./loading.jl:1784 [inlined]
  [7] macro expansion
    @ Base ./lock.jl:267 [inlined]
  [8] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1747
  [9] #invoke_in_world#3
    @ Base ./essentials.jl:921 [inlined]
 [10] invoke_in_world
    @ Base ./essentials.jl:918 [inlined]
 [11] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1740

However running the same command without the AMDGPU project:

/home/me/julia/julia-1.10.0-beta3/bin/julia -Cnative -J/home/me/julia/julia-1.10.0-beta3/lib/julia/sys.so -g1 --startup-file=no --threads=1 -e 'push!(LOAD_PATH, "/home/me/.julia/packages/AMDGPU/zf490/");import ROCmDeviceLibs_jll; println(ROCmDeviceLibs_jll.bitcode_path)'
/home/me/.julia/artifacts/5ad5ecb46e3c334821f54c1feecc6c152b7b6a45/amdgcn/bitcode

However, if using a project (test) with the mixed device libs installed, safe_exec calls:

/home/me/julia/julia-1.10.0-beta3/bin/julia -Cnative -J/home/me/julia/julia-1.10.0-beta3/lib/julia/sys.so -g1 --startup-file=no --project=/home/me/julia/test/Project.toml --threads=1 -e 'push!(LOAD_PATH, "/home/me/.julia/packages/AMDGPU/zf490/");push!(LOAD_PATH, "/home/me/julia/test/Project.toml");import ROCmDeviceLibs_jll; println(ROCmDeviceLibs_jll.bitcode_path)'
/home/me/.julia/artifacts/5ad5ecb46e3c334821f54c1feecc6c152b7b6a45/amdgcn/bitcode

So the device libs detection only works if in an active project. If this is intentional/expected LMK and I'll write a pull request for the docs.

@pxl-th
Copy link
Member

pxl-th commented Nov 19, 2023

PR #540 now handles everything automatically and there is no need for use_devlibs_jll preference.
So it should fix this as well.

@pxl-th
Copy link
Member

pxl-th commented Nov 20, 2023

AMDGPU 0.7.4 release now includes the fixes. Feel free to reopen if needed.

@pxl-th pxl-th closed this as completed Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants