Skip to content

More tests and better error type for cusparse generic#2744

Merged
maleadt merged 1 commit intomasterfrom
ksh/sparse_generic
Apr 14, 2025
Merged

More tests and better error type for cusparse generic#2744
maleadt merged 1 commit intomasterfrom
ksh/sparse_generic

Conversation

@kshyatt
Copy link
Copy Markdown
Member

@kshyatt kshyatt commented Apr 14, 2025

No description provided.

@kshyatt kshyatt added cuda libraries Stuff about CUDA library wrappers. tests Adds or changes tests. labels Apr 14, 2025
@kshyatt kshyatt marked this pull request as ready for review April 14, 2025 13:44
Comment thread lib/cusparse/generic.jl
nzVal = CuVector{T}(undef, nnzB[])
B = CuSparseMatrixCSC{T, Cint}(colPtr, rowVal, nzVal, (m,n))
cusparseCscSetPointers(desc_sparse, B.colPtr, B.rowVal, B.nzVal)
else
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This I think we can remove because it should be caught higher up in the function

@github-actions
Copy link
Copy Markdown
Contributor

Your PR requires formatting changes to meet the project's style guidelines.
Please consider running Runic (git runic master) to apply these changes.

Click here to view the suggested changes.
diff --git a/test/libraries/cusparse/generic.jl b/test/libraries/cusparse/generic.jl
index 28f624f9a..48dccfa6a 100644
--- a/test/libraries/cusparse/generic.jl
+++ b/test/libraries/cusparse/generic.jl
@@ -363,7 +363,7 @@ for SparseMatrixType in keys(SPGEMM_ALGOS)
                     F = alpha * opa(A) * opb(B) + beta * E
                     dF = gemm(transa, transb, alpha, dA, dB, beta, dE, 'O', algo, same_pattern=false)
                     @test F ≈ SparseMatrixCSC(dF)
-                    
+
                     # not same pattern
                     G = sprand(T, 25, 35, 0.4)
                     dG = SparseMatrixType(G)
@@ -374,11 +374,11 @@ for SparseMatrixType in keys(SPGEMM_ALGOS)
                 end
             end
             if SparseMatrixType == CuSparseMatrixCSR
-                A = sprand(T,25,10,0.2)
-                B = sprand(T,10,35,0.3)
+                A = sprand(T, 25, 10, 0.2)
+                B = sprand(T, 10, 35, 0.3)
                 dA = SparseMatrixType(A)
                 dB = SparseMatrixType(B)
-                C  = A * B
+                C = A * B
                 dC = SparseMatrixType(C)
                 @test_throws ArgumentError("Sparse matrix-matrix multiplication only supports transa (T) = 'N' and transb (C) = 'N'") gemm!('T', 'C', one(T), dA, dB, zero(T), dC, 'O', algo)
             end

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.37%. Comparing base (12caaf5) to head (a2ef9bc).
Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #2744       +/-   ##
===========================================
- Coverage   88.89%   74.37%   -14.52%     
===========================================
  Files         153      153               
  Lines       13154    13020      -134     
===========================================
- Hits        11693     9684     -2009     
- Misses       1461     3336     +1875     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maleadt maleadt merged commit 591f61d into master Apr 14, 2025
4 checks passed
@maleadt maleadt deleted the ksh/sparse_generic branch April 14, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda libraries Stuff about CUDA library wrappers. tests Adds or changes tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants