Closed
Description
julia> using CUDA, NonlinearSolve; CUDA.allowscalar(false)
julia> x = ComponentArray(; x = ones(2), y = ones(2)) |> cu
ComponentVector{Float32, CuArray{Float32, 1, CUDA.DeviceMemory}, Tuple{Axis{(x = 1:2, y = 3:4)}}}(x = Float32[1.0, 1.0], y = Float32[1.0, 1.0])
julia> NonlinearSolveBase.L2_NORM(x)
ERROR: Scalar indexing is disallowed.
Invocation of getindex resulted in scalar indexing of a GPU array.
This is typically caused by calling an iterating implementation of a method.
Such implementations *do not* execute on the GPU, but very slowly on the CPU,
and therefore should be avoided.
Need a ComponentArray extension with L2_NORM(x::CA) = L2_NORM(getdata(x))
.
Metadata
Metadata
Assignees
Labels
Something isn't workingSomething isn't working