I’m trying to rewrite some legacy code and switch from scipy to pytorch and I’m having difficulties re-writing the spdiags and spsolve.
How could I perform these operations on GPUs?
A = spdiags(B.T,d,k,k)

A = A + A.T + spdiags(D.T, 0, k, k)

return spsolve(A, input)