-
Notifications
You must be signed in to change notification settings - Fork 232
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
CUSPARSE does not support reductions #1406
Labels
enhancement
New feature or request
Comments
Not going to happen anytime soon. |
Workaround for Base.sum(x::AbstractCuSparseMatrix; dims=:) = cusparse_sum(x, Val(dims))
cusparse_sum(x, ::Val{:}) = sum(cusparse_sum(x, Val(1)))
function cusparse_sum(x::AbstractCuSparseMatrix, ::Val{1})
m, n = size(x)
v = CUDA.ones(1, m)
return v * x
end
function cusparse_sum(x::AbstractCuSparseMatrix, ::Val{2})
m, n = size(x)
v = CUDA.ones(n, 1)
return x * v
end |
maleadt
changed the title
support reductions for sparse arrays
CUSPARSE does not support reductions
Feb 25, 2022
Some support for reductions ( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On master, even the simplest reduction fails:
I get a similar errors with
CuSparseMatrixCSC
andsum(x; dims=1)
.The text was updated successfully, but these errors were encountered: