Skip to content

Fails to create array on Rusticl driver #255

Closed
@VarLad

Description

@VarLad

Tried with AMD Vega8 GPU as well as RTX3050M
The command to run julia:

RUSTICL_ENABLE=zink julia

and to reproduce:

julia> using OpenCL

julia> OpenCL.versioninfo()
OpenCL.jl version 0.10.0

Toolchain:
 - Julia v1.11.0-rc4
 - OpenCL_jll v2024.5.8+1

Available platforms: 2
 - Clover
   OpenCL 1.1, Mesa 24.2.4
   · AMD Radeon Graphics (radeonsi, renoir, LLVM 19.1.0, DRM 3.59, 6.11.2-300.fc41.x86_64) (fp64)
 - rusticl
   OpenCL 3.0
   · zink Vulkan 1.3(NVIDIA GeForce RTX 3050 Laptop GPU (NVK GA107) (MESA_NVK)) (il)
   · zink Vulkan 1.3(AMD Radeon Graphics (RADV RENOIR) (MESA_RADV)) (il)

julia> OpenCL.cl.device!(OpenCL.cl.devices(OpenCL.cl.platform!("rusticl"))[1])
┌ Warning: No OpenCL driver JLLs were detected at the time of the first call into OpenCL.jl.
│ Only system drivers will be available.
└ @ OpenCL.cl ~/.julia/packages/OpenCL/VxZWM/lib/cl/api.jl:80
OpenCL.Device(zink Vulkan 1.3(NVIDIA GeForce RTX 3050 Laptop GPU (NVK GA107) (MESA_NVK)) on rusticl @0x00000000323d75b8)

julia> CLArray([1,2])
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::CLArray{Int64, 1}, dst_off::Int64, src::Vector{Int64}, 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:175 [inlined]
  [9] copyto!
    @ ~/.julia/packages/OpenCL/VxZWM/src/array.jl:181 [inlined]
 [10] CLArray{Int64, 1}(hostarray::Vector{Int64}; kwargs::@Kwargs{})
    @ OpenCL ~/.julia/packages/OpenCL/VxZWM/src/array.jl:119
 [11] CLArray
    @ ~/.julia/packages/OpenCL/VxZWM/src/array.jl:117 [inlined]
 [12] CLArray(A::Vector{Int64})
    @ OpenCL ~/.julia/packages/OpenCL/VxZWM/src/array.jl:123
 [13] top-level scope
    @ REPL[3]:1
 [14] top-level scope
    @ ~/.julia/packages/OpenCL/VxZWM/lib/cl/api.jl:113

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions