JuliaGPU/AMDGPU.jl

hipErrorSharedObjectInitFailed

vchuravy opened this issue · 2 comments

using AMDGPU

*ulia> A = AMDGPU.zeros(Float64, 32, 32)
ERROR: HIPError(code hipErrorSharedObjectInitFailed, shared object initialization failed)
Stacktrace:
  [1] check
    @ ~/.julia/packages/AMDGPU/Dl7nN/src/hip/error.jl:149 [inlined]
  [2] |>
    @ ./operators.jl:907 [inlined]
  [3] AMDGPU.HIP.HIPModule(data::Vector{UInt8})
    @ AMDGPU.HIP ~/.julia/packages/AMDGPU/Dl7nN/src/hip/module.jl:11
  [4] hiplink(job::GPUCompiler.CompilerJob, compiled::NamedTuple{(:obj, :entry, :global_hostcalls), Tuple{Vector{UInt8}, String, Vector{Symbol}}})
    @ AMDGPU.Compiler ~/.julia/packages/AMDGPU/Dl7nN/src/compiler/codegen.jl:155
  [5] actual_compilation(cache::Dict{Any, AMDGPU.HIP.HIPFunction}, src::Core.MethodInstance, world::UInt64, cfg::GPUCompiler.CompilerConfig{GPUCompiler.GCNCompilerTarget, AMDGPU.Compiler.HIPCompilerParams}, compiler::typeof(AMDGPU.Compiler.hipcompile), linker::typeof(AMDGPU.Compiler.hiplink))
    @ GPUCompiler ~/.julia/packages/GPUCompiler/YO8Uj/src/execution.jl:132
  [6] cached_compilation(cache::Dict{Any, AMDGPU.HIP.HIPFunction}, src::Core.MethodInstance, cfg::GPUCompiler.CompilerConfig{GPUCompiler.GCNCompilerTarget, AMDGPU.Compiler.HIPCompilerParams}, compiler::Function, linker::Function)
    @ GPUCompiler ~/.julia/packages/GPUCompiler/YO8Uj/src/execution.jl:103
  [7] macro expansion
    @ ~/.julia/packages/AMDGPU/Dl7nN/src/compiler/codegen.jl:90 [inlined]
  [8] macro expansion
    @ ./lock.jl:267 [inlined]
  [9] hipfunction(f::GPUArrays.var"#5#6", tt::Type{Tuple{AMDGPU.ROCKernelContext, AMDGPU.Device.ROCDeviceMatrix{Float64, 1}, Float64}}; kwargs::Base.Pairs{Symbol, Nothing, Tuple{Symbol}, NamedTuple{(:name,), Tuple{Nothing}}})
    @ AMDGPU.Compiler ~/.julia/packages/AMDGPU/Dl7nN/src/compiler/codegen.jl:84
 [10] hipfunction
    @ ~/.julia/packages/AMDGPU/Dl7nN/src/compiler/codegen.jl:83 [inlined]
 [11] macro expansion
    @ ~/.julia/packages/AMDGPU/Dl7nN/src/highlevel.jl:244 [inlined]
 [12] #gpu_call#62
    @ ~/.julia/packages/AMDGPU/Dl7nN/src/gpuarrays.jl:9 [inlined]
 [13] gpu_call
    @ ~/.julia/packages/AMDGPU/Dl7nN/src/gpuarrays.jl:5 [inlined]
 [14] #gpu_call#1
    @ ~/.julia/packages/GPUArrays/5XhED/src/device/execution.jl:65 [inlined]
 [15] gpu_call
    @ ~/.julia/packages/GPUArrays/5XhED/src/device/execution.jl:34 [inlined]
 [16] fill!(A::ROCMatrix{Float64, AMDGPU.Runtime.Mem.HIPBuffer}, x::Float64)
    @ GPUArrays ~/.julia/packages/GPUArrays/5XhED/src/host/construction.jl:14
 [17] zeros(::Type, ::Int64, ::Vararg{Int64})
    @ AMDGPU ~/.julia/packages/AMDGPU/Dl7nN/src/array.jl:273
 [18] top-level scope
    @ REPL[4]:1

On HIP Devices (1):

  • HIPDevice(name="AMD Radeon RX 6800 XT", id=1)

AMDGPU v0.5.1

pxl-th commented

Can you try adding HSA_OVERRIDE_GFX_VERSION=10.3.0 before launching Julia?
See this section: https://amdgpu.juliagpu.org/dev/#Navi-2-(GFX103x)-support

That works. Can we just make this the default?