Skip to content

Indexing VectorOfArrays on GPU throws "scalar indexing" warning #178

Description

@ma-sadeghi
x = CUDA.zeros(5)
y = VectorOfArray([x,x,x])
y[:,:]

The last line produces the following warning:

┌ Warning: Performing scalar indexing on task Task (runnable) @0x00007efcf315c010. 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 are only permitted from the REPL for prototyping purposes. If you did intend to
│ index this array, annotate the caller with @allowscalar.
└ @ GPUArrays /home/anaconda/.julia/packages/GPUArrays/gkF6S/src/host/indexing.jl:56
5×3 Matrix{Float32}:
 0.0  0.0  0.0
 0.0  0.0  0.0
 0.0  0.0  0.0
 0.0  0.0  0.0
 0.0  0.0  0.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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