Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

L2_NORM resorts to scalar indexing on GPU ComponentArray #524

Copy link
Copy link
Closed
@vpuri3

Description

@vpuri3
Issue body actions
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

No one assigned

    Labels

    bugSomething isn't workingSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.