Skip to content
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

Calling similar(...) on AbstractCuSparseArray with dims #1184

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
cc65094
calling similar on AbstractCuSparseArray with dims
birkmichael Oct 4, 2021
ad2c4a4
Merge pull request #1 from birkmichael/CuSparse_Similar
birkmichael Oct 4, 2021
2af05e4
robust handling of similar CSC/CSR
birkmichael Oct 4, 2021
25ad0e1
Merge pull request #2 from birkmichael/CuSparse_Similar
birkmichael Oct 4, 2021
53724ce
fixed getrowptr,colvals
birkmichael Oct 4, 2021
8c7a33e
Merge pull request #3 from birkmichael/CuSparse_Similar
birkmichael Oct 4, 2021
6a8b64b
forgot Base. prefix to several instances of similar
birkmichael Oct 4, 2021
ad222bf
Merge pull request #4 from birkmichael/CuSparse_Similar
birkmichael Oct 4, 2021
2620166
used fill instead of CUDA.fill in matrix initialization
birkmichael Oct 4, 2021
14149a2
Merge pull request #5 from birkmichael/CuSparse_Similar
birkmichael Oct 4, 2021
05c85ef
tests for similar, unfinished
birkmichael Oct 5, 2021
309f02e
Created test set for 'similar'
birkmichael Oct 6, 2021
6ec07de
imported some SparseArrays methods
birkmichael Oct 6, 2021
fb4b253
Fixed CSR rowPtr setting in 'similar'
birkmichael Oct 6, 2021
df04acb
tests for 'similar' for CSC,CSR
birkmichael Oct 6, 2021
6956881
Merge pull request #6 from birkmichael/CuSparse_Similar_tests
birkmichael Oct 6, 2021
4bf8e00
splatted 1D tuple dims when creating vector
birkmichael Oct 6, 2021
2d5b613
Merge pull request #7 from birkmichael/vectorfix
birkmichael Oct 6, 2021
faba255
Merge pull request #8 from birkmichael/CuSparse_Similar
birkmichael Oct 8, 2021
1a097db
Added method getindex(CuSparseMat,Colon), changed show for vectors
birkmichael Oct 9, 2021
38cf586
Added conversion from matrix to vector
birkmichael Oct 9, 2021
4b3466e
Merge pull request #9 from birkmichael/CuSparse_similar_toVector
birkmichael Oct 9, 2021
9b1f529
Merge branch 'master' into CuSparse_Similar
birkmichael Oct 9, 2021
575b576
Full indexing of CuSparseArrays
birkmichael Oct 21, 2021
bd16d76
Vectorising matrices
birkmichael Oct 21, 2021
dc4075f
Merge branch 'JuliaGPU:master' into master
birkmichael Oct 22, 2021
69e69d6
Added vectorising of CuSparseMatrices
birkmichael Oct 22, 2021
9a7196f
Update array.jl
birkmichael Oct 22, 2021
f90a4d6
Update conversions.jl
birkmichael Oct 22, 2021
0e45e48
Update conversions.jl
birkmichael Oct 22, 2021
43240b3
Merge pull request #11 from birkmichael/CuSparse_Similar_matrixIndexing
birkmichael Oct 22, 2021
e62cbb6
changed to match updates in master
birkmichael Oct 22, 2021
509d10a
Update conversions.jl
birkmichael Oct 22, 2021
e47b56b
Merge pull request #12 from JuliaGPU/master
birkmichael Oct 22, 2021
66103d1
Merge branch 'CuSparse_Similar' into master
birkmichael Oct 22, 2021
3b64e56
Merge pull request #13 from birkmichael/master
birkmichael Oct 22, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/cusparse/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ Base.similar(Mat::CuSparseMatrixCSC) = CuSparseMatrixCSC(copy(Mat.colPtr), copy(
Base.similar(Mat::CuSparseMatrixCSR) = CuSparseMatrixCSR(copy(Mat.rowPtr), copy(Mat.colVal), similar(nonzeros(Mat)), Mat.dims)
Base.similar(Mat::CuSparseMatrixBSR) = CuSparseMatrixBSR(copy(Mat.rowPtr), copy(Mat.colVal), similar(nonzeros(Mat)), Mat.blockDim, Mat.dir, nnz(Mat), Mat.dims)

Base.similar(a::AbstractCuSparseArray{Tv, <:Any, <:Any}, dims::Base.Dims{N}) where {Tv,N} =
birkmichael marked this conversation as resolved.
Show resolved Hide resolved
CuArray{Tv,N}(undef, dims)
Base.similar(a::AbstractCuSparseArray{<:Any, <:Any, <:Any}, ::Type{T}, dims::Base.Dims{N}) where {T,N} =
CuArray{T,N}(undef, dims)

## array interface

Expand Down