-
Notifications
You must be signed in to change notification settings - Fork 38
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
Fails to create array on Rusticl driver #255
Comments
What does |
For both my NVIDIA and AMD GPUs (with Zink), that is, running with:
I get: I'm guessing that I'll need to wait for proper SVM support in RustiCL to start using OpenCL.jl. That being said, this is different for CPU. julia> CLArray([1,2])
2-element CLArray{Int64, 1}:
Error showing value of type CLArray{Int64, 1}:
ERROR: CLError(code=-59, CL_INVALID_OPERATION)
Stacktrace:
[1] throw_api_error(res::Int32)
@ OpenCL.cl ~/.julia/packages/OpenCL/VxZWM/lib/cl/libopencl.jl:3
[2] check
@ ~/.julia/packages/OpenCL/VxZWM/lib/cl/libopencl.jl:14 [inlined]
[3] clEnqueueSVMMemcpy
@ ~/.julia/packages/OpenCL/VxZWM/lib/cl/api.jl:34 [inlined]
[4] enqueue_svm_memcpy(dst::Ptr{Int64}, src::Ptr{Int64}, nbytes::Int64; blocking::Bool, wait_for::Vector{OpenCL.cl.Event})
@ OpenCL.cl ~/.julia/packages/OpenCL/VxZWM/lib/cl/svm.jl:63
[5] enqueue_svm_memcpy
@ ~/.julia/packages/OpenCL/VxZWM/lib/cl/svm.jl:57 [inlined]
[6] unsafe_copyto!(dst::Vector{Int64}, dst_off::Int64, src::CLArray{Int64, 1}, src_off::Int64, N::Int64; blocking::Bool)
@ OpenCL ~/.julia/packages/OpenCL/VxZWM/src/array.jl:226
[7] unsafe_copyto!
@ ~/.julia/packages/OpenCL/VxZWM/src/array.jl:222 [inlined]
[8] copyto!
@ ~/.julia/packages/OpenCL/VxZWM/src/array.jl:191 [inlined]
[9] copyto!
@ ~/.julia/packages/OpenCL/VxZWM/src/array.jl:202 [inlined]
[10] Array
@ ~/.julia/packages/OpenCL/VxZWM/src/array.jl:127 [inlined]
[11] Array
@ ./boot.jl:605 [inlined]
[12] convert
@ ./array.jl:607 [inlined]
[13] adapt_storage
@ ~/.julia/packages/GPUArrays/qt4ax/src/host/abstractarray.jl:115 [inlined]
[14] adapt_structure
@ ~/.julia/packages/Adapt/7T9au/src/Adapt.jl:57 [inlined]
[15] adapt
@ ~/.julia/packages/Adapt/7T9au/src/Adapt.jl:40 [inlined]
[16] print_array
@ ~/.julia/packages/GPUArrays/qt4ax/src/host/abstractarray.jl:118 [inlined]
[17] show(io::IOContext{Base.TTY}, ::MIME{Symbol("text/plain")}, X::CLArray{Int64, 1})
@ Base ./arrayshow.jl:399
[18] (::REPL.var"#68#69"{REPL.REPLDisplay{REPL.LineEditREPL}, MIME{Symbol("text/plain")}, Base.RefValue{Any}})(io::Any)
@ REPL ~/.julia/juliaup/julia-1.11.0-rc4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:348
[19] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
@ REPL ~/.julia/juliaup/julia-1.11.0-rc4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:646
[20] display(d::REPL.REPLDisplay, mime::MIME{Symbol("text/plain")}, x::Any)
@ REPL ~/.julia/juliaup/julia-1.11.0-rc4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:334
[21] display
@ ~/.julia/juliaup/julia-1.11.0-rc4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:353 [inlined]
[22] display(x::Any)
@ Base.Multimedia ./multimedia.jl:340
[23] #invokelatest#2
@ ./essentials.jl:1054 [inlined]
[24] invokelatest
@ ./essentials.jl:1051 [inlined]
[25] print_response(errio::IO, response::Any, show_value::Bool, have_color::Bool, specialdisplay::Union{Nothing, AbstractDisplay})
@ REPL ~/.julia/juliaup/julia-1.11.0-rc4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:390
[26] (::REPL.var"#70#71"{REPL.LineEditREPL, Pair{Any, Bool}, Bool, Bool})(io::Any)
@ REPL ~/.julia/juliaup/julia-1.11.0-rc4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:359
[27] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
@ REPL ~/.julia/juliaup/julia-1.11.0-rc4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:646
[28] print_response(repl::REPL.AbstractREPL, response::Any, show_value::Bool, have_color::Bool)
@ REPL ~/.julia/juliaup/julia-1.11.0-rc4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:357
[29] (::REPL.var"#do_respond#96"{Bool, Bool, REPL.var"#112#130"{…}, REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::Any, ok::Bool)
@ REPL ~/.julia/juliaup/julia-1.11.0-rc4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:988
[30] #invokelatest#2
@ ./essentials.jl:1054 [inlined]
[31] invokelatest
@ ./essentials.jl:1051 [inlined]
[32] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
@ REPL.LineEdit ~/.julia/juliaup/julia-1.11.0-rc4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2749
[33] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
@ REPL ~/.julia/juliaup/julia-1.11.0-rc4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:1456
[34] (::REPL.var"#75#81"{REPL.LineEditREPL, REPL.REPLBackendRef})()
@ REPL ~/.julia/juliaup/julia-1.11.0-rc4+0.x64.linux.gnu/share/julia/stdlib/v1.11/REPL/src/REPL.jl:461
Some type information was truncated. Use `show(err)` to see complete types. |
Is the latter a |
Looks like it. Does manually copying back to an
Guess I didn't add the check; the |
Apparently this works (for CPU): julia> x = CLArray([1,2]);
julia> y = CLArray([2,3]);
julia> v = x + y;
julia> u = x .* y;
julia> typeof(u)
CLArray{Int64, 1} |
That's interesting. I wonder if it's something to do with the cross-queue usage of the allocations (the REPL display code runs on another task, which uses another queue). |
Tried with AMD Vega8 GPU as well as RTX3050M
The command to run julia:
and to reproduce:
The text was updated successfully, but these errors were encountered: