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
I cannot figure out how to add a value to the diagonal, and it's showing some missing dispatches.
using CUDA
CUDA.allowscalar(false)
W =cu(sprand(100,100,0.1))
J =cu(sprand(100,100,0.1))
idxs =diagind(W)
λ =1.0@.@view(W[idxs]) =@view(W[idxs]) + λ # Scalar indexing
Base.:+(A::CUSPARSE.CuSparseMatrix,I::UniformScaling) = A +Diagonal(CuArray(ones(size(A,1))))
Base.:-(A::CUSPARSE.CuSparseMatrix,I::UniformScaling) = A -Diagonal(CuArray(ones(size(A,1))))
@showtypeof(W + λ*I) # CuArray not sparse :(
W .= W + λ*I # Scalar index
CUSPARSE is still missing some dispatches for full generic handling, but specializing this would still make sense anyways.
Currently still blocked on #1566 by JuliaGPU/CUDA.jl#1372
I cannot figure out how to add a value to the diagonal, and it's showing some missing dispatches.
This is the last piece to finish SciML/OrdinaryDiffEq.jl#1566 I think.
The text was updated successfully, but these errors were encountered: