You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When trying to initialize the integrator for a SchrodingerProblem put on the GPU via the adapt function, the following warning is issued:
Warning: Performing scalar indexing on task Task (runnable) @0x00007fa59fb54010.
│ 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.
└ @ GPUArraysCore ~/.julia/packages/GPUArraysCore/B3xv7/src/GPUArraysCore.jl:103
Calling CUDA.allowscalar(false) and repeating the operation produces a stack trace that highlights some issue over matrix-vector multiplication in LinearAlgebra.
To Reproduce
using Bloqade
using Adapt, CUDA
nsites = 10;
atoms = generate_sites(ChainLattice(), nsites, scale = 5.74)
h = rydberg_h(atoms; Ω = 4 * 2π, Δ = 0)
reg = zero_state(10)
prob = SchrodingerProblem(reg, 1.6, h)
gpu_prob = adapt(CuArray, SchrodingerProblem(reg, 1.6, h))
# where the warning pops up
integrator = init(gpu_prob, Vern8())
Describe the bug
When trying to initialize the integrator for a
SchrodingerProblem
put on the GPU via theadapt
function, the following warning is issued:Calling
CUDA.allowscalar(false)
and repeating the operation produces a stack trace that highlights some issue over matrix-vector multiplication inLinearAlgebra
.To Reproduce
cc: @Roger-luo
The text was updated successfully, but these errors were encountered: