Add a sorting check to the CUDA/HIP spgeam kernel and sort the diagonal in Schwarz precond#1932
Closed
Add a sorting check to the CUDA/HIP spgeam kernel and sort the diagonal in Schwarz precond#1932
Conversation
…al in Schwarz precond
yhmtsai
reviewed
Sep 26, 2025
Comment on lines
+1402
to
+1409
| // check the sorting | ||
| bool sorted; | ||
| is_sorted_by_column_index(exec, a, &sorted); | ||
| if (!sorted) | ||
| throw std::invalid_argument("spgeam: a is not sorted by column index"); | ||
| is_sorted_by_column_index(exec, b, &sorted); | ||
| if (!sorted) | ||
| throw std::invalid_argument("spgeam: b is not sorted by column index"); |
Member
There was a problem hiding this comment.
should it be in the data validation?
Member
|
I am working on a PR that introduces a better interface for SpGEMM/SpGEAM, and would make this change obsolete, I would suggest holding off on it until that PR is ready. |
Collaborator
Author
|
@upsj so did your PR make these changes unneeded effectively solving the issue? |
Member
|
@gojakuch It added a new interface with clear documentation, which is at least an improvement - I think adding a check here could be detrimental, since the cost of an SpGEAM is in the same order of magnitude as the cost of the sortedness check in the success case. |
Collaborator
Author
|
I'll open another PR that just adds the sorting of the matrix in the preconditioner to fix the issue using the new interface without adding the sorting check |
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.
Fixes: #1920