We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently, converting a matrix that could be dense or sparse requires explicit branching:
if x isa SparseMatrixCSC # adapt(CuSparseMatrixCSC, x) does not work, BTW CuSparseMatrixCSC(x) else adapt(CuArray, x) end
It would be nice if adapt can do something like
adapt
to = Union{CuArray, CuSparseMatrixCSC, CuSparseMatrixCSR} adapt(to, zeros(2, 2)) :: CuArray adapt(to, spzeros(2, 2)) :: CuSparseMatrixCSC adapt(to, transpose(spzeros(2, 2))) :: CuSparseMatrixCSR
Is it in the scope of this package?
The text was updated successfully, but these errors were encountered:
I think it'd be fine for adapt(CuArray, x) to support sparse arrays like this. However, that would have to happen in CuArrays.jl, not adapt.jl itself.
adapt(CuArray, x)
Sorry, something went wrong.
Thanks for the clarification. So I'll close this issue for now. Maybe I'll open a PR in CuArrays.jl later.
No branches or pull requests
Currently, converting a matrix that could be dense or sparse requires explicit branching:
It would be nice if
adapt
can do something likeIs it in the scope of this package?
The text was updated successfully, but these errors were encountered: