More tests and better error type for cusparse generic#2744
Merged
Conversation
kshyatt
commented
Apr 14, 2025
| nzVal = CuVector{T}(undef, nnzB[]) | ||
| B = CuSparseMatrixCSC{T, Cint}(colPtr, rowVal, nzVal, (m,n)) | ||
| cusparseCscSetPointers(desc_sparse, B.colPtr, B.rowVal, B.nzVal) | ||
| else |
Member
Author
There was a problem hiding this comment.
This I think we can remove because it should be caught higher up in the function
Contributor
|
Your PR requires formatting changes to meet the project's style guidelines. 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 |
maleadt
approved these changes
Apr 14, 2025
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.