-
Notifications
You must be signed in to change notification settings - Fork 6
Support sparse matrices from rocSPARSE #255
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #255 +/- ##
============================================
- Coverage 100.00% 21.65% -78.35%
============================================
Files 17 16 -1
Lines 1939 1972 +33
============================================
- Hits 1939 427 -1512
- Misses 0 1545 +1545 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Hum I should copy-paste the "conversion" functions that I added in CUDA.jl. I have the following errors with AMD GPUs: (n = 100, p = 0.05): Error During Test at /home/amontoison/Argonne/SparseMatrixColorings.jl/test/rocm.jl:51
Got exception outside of a @test
Scalar indexing is disallowed.
Invocation of getindex resulted in scalar indexing of a GPU array.
This is typically caused by calling an iterating implementation of a method.
Such implementations *do not* execute on the GPU, but very slowly on the CPU,
and therefore should be avoided.
If you want to allow scalar iteration, use `allowscalar` or `@allowscalar`
to enable scalar iteration globally or for the operations in question.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] errorscalar(op::String)
@ GPUArraysCore ~/.julia/x86_64/packages/GPUArraysCore/aNaXo/src/GPUArraysCore.jl:151
[3] _assertscalar(op::String, behavior::GPUArraysCore.ScalarIndexing)
@ GPUArraysCore ~/.julia/x86_64/packages/GPUArraysCore/aNaXo/src/GPUArraysCore.jl:124
[4] assertscalar(op::String)
@ GPUArraysCore ~/.julia/x86_64/packages/GPUArraysCore/aNaXo/src/GPUArraysCore.jl:112
[5] getindex
@ ~/.julia/x86_64/packages/GPUArrays/uiVyU/src/host/indexing.jl:50 [inlined]
[6] getindex(A::ROCSparseMatrixCSR{Float64, Int32}, i0::Int64, i1::Int64)
@ AMDGPU.rocSPARSE ~/.julia/x86_64/packages/AMDGPU/wH6SV/src/sparse/array.jl:352
[7] _getindex
@ ./abstractarray.jl:1358 [inlined]
[8] getindex
@ ./abstractarray.jl:1312 [inlined]
[9] iterate
@ ./abstractarray.jl:1209 [inlined]
[10] iterate
@ ./abstractarray.jl:1207 [inlined]
[11] SparseMatrixCSC{Float64, Int64}(M::ROCSparseMatrixCSR{Float64, Int32})
@ SparseArrays ~/Applications/julia/x86_64/julia-1.11.5/share/julia/stdlib/v1.11/SparseArrays/src/sparsematrix.jl:891
[12] SparseMatrixCSC
@ ~/Applications/julia/x86_64/julia-1.11.5/share/julia/stdlib/v1.11/SparseArrays/src/sparsematrix.jl:885 [inlined]
[13] convert
@ ~/Applications/julia/x86_64/julia-1.11.5/share/julia/stdlib/v1.11/SparseArrays/src/sparsematrix.jl:980 [inlined]
[14] sparse
@ ~/Applications/julia/x86_64/julia-1.11.5/share/julia/stdlib/v1.11/SparseArrays/src/sparsematrix.jl:1016 [inlined]
[15] matrix_versions(A::ROCSparseMatrixCSR{Float64, Int32})
@ SparseMatrixColorings ~/.julia/x86_64/packages/SparseMatrixColorings/FZwji/src/matrices.jl:15
[16] macro expansion
@ ~/Applications/julia/x86_64/julia-1.11.5/share/julia/stdlib/v1.11/Test/src/Test.jl:1814 [inlined]
[17] test_coloring_decompression(A0::ROCSparseMatrixCSR{Float64, Int32}, problem::ColoringProblem{:symmetric, :column}, algo::GreedyColoringAlgorithm{:direct, NaturalOrder}; B0::Nothing, color0::Nothing, test_fast::Bool, gpu::Bool)
@ Main ~/Argonne/SparseMatrixColorings.jl/test/utils.jl:28
[18] macro expansion
@ ~/Argonne/SparseMatrixColorings.jl/test/rocm.jl:53 [inlined]
[19] macro expansion
@ ~/Applications/julia/x86_64/julia-1.11.5/share/julia/stdlib/v1.11/Test/src/Test.jl:1793 [inlined]
[20] macro expansion
@ ~/Argonne/SparseMatrixColorings.jl/test/rocm.jl:51 [inlined]
[21] macro expansion
@ ~/Applications/julia/x86_64/julia-1.11.5/share/julia/stdlib/v1.11/Test/src/Test.jl:1793 [inlined]
[22] macro expansion
@ ~/Argonne/SparseMatrixColorings.jl/test/rocm.jl:50 [inlined]
[23] macro expansion
@ ~/Applications/julia/x86_64/julia-1.11.5/share/julia/stdlib/v1.11/Test/src/Test.jl:1704 [inlined]
[24] top-level scope
@ ~/Argonne/SparseMatrixColorings.jl/test/rocm.jl:48
[25] include(fname::String)
@ Main ./sysimg.jl:38
[26] macro expansion
@ ~/Argonne/SparseMatrixColorings.jl/test/runtests.jl:24 [inlined]
[27] macro expansion
@ ~/Applications/julia/x86_64/julia-1.11.5/share/julia/stdlib/v1.11/Test/src/Test.jl:1704 [inlined]
[28] macro expansion
@ ~/Argonne/SparseMatrixColorings.jl/test/runtests.jl:22 [inlined]
[29] macro expansion
@ ~/Applications/julia/x86_64/julia-1.11.5/share/julia/stdlib/v1.11/Test/src/Test.jl:1704 [inlined]
[30] top-level scope
@ ~/Argonne/SparseMatrixColorings.jl/test/runtests.jl:14
[31] include(fname::String)
@ Main ./sysimg.jl:38
[32] top-level scope
@ none:6
[33] eval
@ ./boot.jl:430 [inlined]
[34] exec_options(opts::Base.JLOptions)
@ Base ./client.jl:296
[35] _start()
@ Base ./client.jl:531 |
This seems to be just in the |
I am still traveling this week but next week I can fix the issue in |
@gdalle I finally worked on it tonight. julia> include("test/runtests.jl")
Test Summary: | Pass Total Time
SparseMatrixColorings | 422 422 10.5s
CUDA | 0 0.0s
ROCm | 422 422 10.5s |
close #254
Very similar to #253.
I requested access to CI with AMD GPUs last week. I should have it but didn't find time to try it yet.
I can do that when I will back in the US.