-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using CuSparseMatrixCSC for noise_rate_prototype
fails
#557
Comments
This needs more from the CUDA library. MWE: using CUDA
A = zeros(Float32, N, N)
A[:,1] .= ones(N)
W_d = CuArray(W)
W_sparse = sparse(W)
A = CUDA.CUSPARSE.CuSparseMatrixCSC(sparse(A))
false .* A[1,:] |
Tracking in JuliaGPU/CUDA.jl#2209 |
Hi there, apologies for opening this and then ghosting. In response to this JuliaGPU/CUDA.jl#2209 (comment) in the tracked issue, why are we necessarily trying to zero a vector of similar type to the noise matrix? For example, although the noise rate matrix may well by sparse, the vector of resulting noise increments may not be sparse. Would it not be more sensible to zero a vector of same type as I am almost certainly misunderstanding something here. Thanks in advance! |
That's what's happening internal in the package that's failing. |
Yeah I don't understand why The offending code is this: StochasticDiffEq.jl/src/solve.jl Lines 298 to 303 in 870e062
Line 299 will evaluate to false if if noise_rate_prototype isa CuSparseMatrix
rand_prototype = CUDA.zeros(randEltype, size(noise_rate_prototype,2)
end With the important caveat that I don't know what Cheers. |
|
I am curious why this is the case? Should it not match the typeof
At least this is how I assumed it would work by reading the docs. If we zero a sparse CUDA array for the random vector, surely we then run into a similar of problem of trying to add a |
It needs to match the length of the row but the type only has to be compatible with computations of As a "most case" solution, |
Describe the bug 🐞
I am unsure if this is a bug, or simply lack of support but calling
solve
with anoise_rate_prototype
of typeCuSparseMatrixCSC
fails when constructing the prototype for noise increment (It would seem).Expected behavior
Matrices from
CUDA.CUSPARSE
can be used fornoise_rate_prototype
.Minimal Reproducible Example 👇
Error & Stacktrace⚠️
Environment (please complete the following information):
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()
Additional context
CUDA.versioninfo()
The text was updated successfully, but these errors were encountered: