Open rkierulf opened 4 weeks ago
The core of the issue:
julia> typeof(view(CuArray{Float32}(undef, 2, 2), CuArray{Bool}(undef, 2, 2)))
SubArray{Float32, 1, CuArray{Float32, 2, CUDA.DeviceMemory}, Tuple{CuArray{CartesianIndex{2}, 1, CUDA.DeviceMemory}}, false}
julia> typeof(view(oneArray{Float32}(undef, 2, 2), oneArray{Bool}(undef, 2, 2)))
SubArray{Float32, 1, oneArray{Float32, 2, oneAPI.oneL0.DeviceBuffer}, Tuple{Vector{CartesianIndex{2}}}, false}
Okay, so the issue is that we keep Base.LogicalIndex
around, which materializes to a Vector
. We should port the following code from CUDA.jl: https://github.com/JuliaGPU/CUDA.jl/blob/master/src/indexing.jl
However, if this isn't a blocker, I'd like to postpone that until we migrate GPUArrays over to KernelAbstractions.jl, so that we can "simply" have a single definition of that functionality over there instead of duplication it across GPU back-ends.
Logical indexing of a matrix using .== doesn't work for oneAPI:
It does work for CUDA, AMDGPU, and Metal based on the results of this build: https://buildkite.com/julialang/komamri-dot-jl/builds/913