Hi there, I just installed oneAPI just as an experiment.
I’m afraid I was not able to run all the examples and searching for a solution was not solving the issue. So I kindly ask for a hint to get this running, or just to give some insights or point to another direction.
When running some code, there is indicated this:
WARNING: both oneL0 and LLVM export “arguments”; uses of it in module oneAPI must be qualified
Also the ] test oneAPI is not running through.
More info and further down the final error:
julia> versioninfo()
Julia Version 1.6.3
Commit ae8452a9e0 (2021-09-23 17:34 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, tigerlake)
julia> using oneAPI
julia> using oneAPI.oneL0
julia> drv = first(dev
device device_alloc devices
device! device_barrier devnull
julia> drv = first(drivers());
julia> dev = first(devices(drv))
ZeDevice(GPU, vendor 0x8086, device 0x9a49): Intel(R) Iris(R) Xe Graphics [0x9a49]
julia> using oneAPI, oneAPI.oneL0
julia> drv = first(drivers());
julia> ctx = ZeContext(drv);
julia> dev = first(devices(drv))
ZeDevice(GPU, vendor 0x8086, device 0x9a49): Intel(R) Iris(R) Xe Graphics [0x9a49]
julia> compute_properties(dev)
(maxTotalGroupSize = 512, maxGroupSizeX = 512, maxGroupSizeY = 512, maxGroupSizeZ = 512, maxGroupCountX = 4294967295, maxGroupCountY = 4294967295, maxGroupCountZ = 4294967295, maxSharedLocalMemory = 65536, subGroupSizes = (8, 16, 32))
julia> queue = ZeCommandQueue(ctx, dev);
julia> execute!(queue) do list
append_barrier!(list)
end
julia> function kernel()
barrier()
return
end
kernel (generic function with 1 method)
julia> @oneapi items=1 kernel()
oneAPI.HostKernel{kernel, Tuple{}}(ZeKernel(ZeModule(Ptr{oneAPI.oneL0._ze_module_handle_t} @0x000000000601aeb0, ZeContext(Ptr{oneAPI.oneL0._ze_context_handle_t} @0x0000000002563f40, ZeDriver(Ptr{oneAPI.oneL0._ze_driver_handle_t} @0x00000000023f9620)), ZeDevice(Ptr{oneAPI.oneL0._ze_device_handle_t} @0x0000000002ee6c20, ZeDriver(Ptr{oneAPI.oneL0._ze_driver_handle_t} @0x00000000023f9620))), Ptr{oneAPI.oneL0._ze_kernel_handle_t} @0x00000000038145c0))
julia> @device_code_llvm @oneapi items=1 kernel()
; CompilerJob of kernel kernel() for GPUCompiler.SPIRVCompilerTarget
define spir_kernel void @_Z17julia_kernel_3621() local_unnamed_addr {
entry:
; @ REPL[16]:2 within `kernel'
; ┌ @ /home/bd/.julia/packages/oneAPI/PolvD/src/device/opencl/synchronization.jl:9 within `barrier' @ /home/bd/.julia/packages/oneAPI/PolvD/src/device/opencl/synchronization.jl:9
; │┌ @ /home/bd/.julia/packages/oneAPI/PolvD/src/device/utils.jl:77 within `macro expansion' @ /home/bd/.julia/packages/LLVM/wnejv/src/interop/pointer.jl:219
; ││┌ @ /home/bd/.julia/packages/LLVM/wnejv/src/interop/pointer.jl:120 within `_typed_llvmcall'
; │││┌ @ /home/bd/.julia/packages/LLVM/wnejv/src/interop/pointer.jl:120 within `macro expansion' @ /home/bd/.julia/packages/LLVM/wnejv/src/interop/base.jl:45
call void @_Z7barrierj(i32 0)
ret void
; └└└└
}
julia> @device_code_spirv @oneapi items=1 kernel()
// CompilerJob of kernel kernel() for GPUCompiler.SPIRVCompilerTarget
; SPIR-V
; Version: 1.0
; Generator: Khronos LLVM/SPIR-V Translator; 14
; Bound: 9
; Schema: 0
OpCapability Addresses
OpCapability Kernel
%1 = OpExtInstImport "OpenCL.std"
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %4 "_Z17julia_kernel_3659"
OpSource OpenCL_C 200000
OpName %entry "entry"
%uint = OpTypeInt 32 0
%uint_2 = OpConstant %uint 2
%uint_0 = OpConstant %uint 0
%void = OpTypeVoid
%3 = OpTypeFunction %void
%4 = OpFunction %void None %3
%entry = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_0
OpReturn
OpFunctionEnd
Here the error:
julia> a = oneArray(rand(Float32, 2,2))
2×2 oneArray{Float32, 2}:
0.149671 0.32529
0.948333 0.172246
julia> a .+ 1
ERROR: UndefVarError: arguments not defined
Stacktrace:
[1] onecall(::ZeKernel, ::Type, ::oneDeviceMatrix{Float32, 1}, ::Vararg{Any, N} where N; groups::Int64, items::Int64, queue::ZeCommandQueue)
@ oneAPI ~/.julia/packages/oneAPI/PolvD/src/compiler/execution.jl:169
[2] macro expansion
@ ~/.julia/packages/oneAPI/PolvD/src/compiler/execution.jl:121 [inlined]
[3] call(::oneAPI.HostKernel{GPUArrays.var"#broadcast_kernel#17"(), Tuple{oneAPI.oneKernelContext, oneDeviceMatrix{Float32, 1}, Base.Broadcast.Broadcasted{Nothing, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}, typeof(+), Tuple{Base.Broadcast.Extruded{oneDeviceMatrix{Float32, 1}, Tuple{Bool, Bool}, Tuple{Int64, Int64}}, Int64}}, Int64}}, ::oneAPI.oneKernelContext, ::oneDeviceMatrix{Float32, 1}, ::Base.Broadcast.Broadcasted{Nothing, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}, typeof(+), Tuple{Base.Broadcast.Extruded{oneDeviceMatrix{Float32, 1}, Tuple{Bool, Bool}, Tuple{Int64, Int64}}, Int64}}, ::Int64; call_kwargs::Base.Iterators.Pairs{Symbol, Int64, Tuple{Symbol, Symbol}, NamedTuple{(:items, :groups), Tuple{Int64, Int64}}})
@ oneAPI ~/.julia/packages/oneAPI/PolvD/src/compiler/execution.jl:93
[4] (::oneAPI.HostKernel{GPUArrays.var"#broadcast_kernel#17"(), Tuple{oneAPI.oneKernelContext, oneDeviceMatrix{Float32, 1}, Base.Broadcast.Broadcasted{Nothing, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}, typeof(+), Tuple{Base.Broadcast.Extruded{oneDeviceMatrix{Float32, 1}, Tuple{Bool, Bool}, Tuple{Int64, Int64}}, Int64}}, Int64}})(::oneAPI.oneKernelContext, ::Vararg{Any, N} where N; kwargs::Base.Iterators.Pairs{Symbol, Int64, Tuple{Symbol, Symbol}, NamedTuple{(:items, :groups), Tuple{Int64, Int64}}})
@ oneAPI ~/.julia/packages/oneAPI/PolvD/src/compiler/execution.jl:179
[5] macro expansion
@ ~/.julia/packages/oneAPI/PolvD/src/compiler/execution.jl:53 [inlined]
[6] gpu_call(::oneAPI.oneArrayBackend, f::Function, args::Tuple{oneArray{Float32, 2}, Base.Broadcast.Broadcasted{Nothing, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}, typeof(+), Tuple{Base.Broadcast.Extruded{oneArray{Float32, 2}, Tuple{Bool, Bool}, Tuple{Int64, Int64}}, Int64}}, Int64}, threads::Int64, blocks::Int64; name::Nothing)
@ oneAPI ~/.julia/packages/oneAPI/PolvD/src/gpuarrays.jl:30
[7] #gpu_call#1
@ ~/.julia/packages/GPUArrays/3sW6s/src/device/execution.jl:76 [inlined]
[8] copyto!
@ ~/.julia/packages/GPUArrays/3sW6s/src/host/broadcast.jl:69 [inlined]
[9] copyto!
@ ./broadcast.jl:936 [inlined]
[10] copy
@ ~/.julia/packages/GPUArrays/3sW6s/src/host/broadcast.jl:47 [inlined]
[11] materialize(bc::Base.Broadcast.Broadcasted{oneAPI.oneArrayStyle{2}, Nothing, typeof(+), Tuple{oneArray{Float32, 2}, Int64}})
@ Base.Broadcast ./broadcast.jl:883
[12] top-level scope
@ REPL[25]:1
Thank you so much for any information on this matter, kind regards.