Add SpMV test for DIA-I and DIA-J#974
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds a new sparse matrix-vector multiply (SpMV) test for the DIA storage format using both row-based (DIA_INDEX_I) and column-based (DIA_INDEX_J) indexing.
- Updates CMakeLists to include the new test file.
- Implements helper routines to build a 4×4 tridiagonal test matrix (makeDIA), input vector (makeB), and expected output vector (makeC), then runs and verifies matvec for both index schemes.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test/CMakeLists.txt | Registered 00_sparse/Dia.cu in test_sources |
| test/00_sparse/Dia.cu | New test file for DIA-format SpMV (I and J) |
Comments suppressed due to low confidence (3)
test/00_sparse/Dia.cu:52
- [nitpick] The variable name 'd' is ambiguous; consider renaming it to 'num_diagonals' to clarify its purpose.
const index_t d = 3;
test/00_sparse/Dia.cu:53
- [nitpick] The single-letter tensor variable 'D' could be more descriptive—e.g., 'diag_data'—to improve readability.
auto D = make_tensor<T>({d * n});
test/00_sparse/Dia.cu:78
- [nitpick] The tensor variable 'O' is non-descriptive; consider renaming it to 'offsets' for clarity.
auto O = make_tensor<index_t>({d});
Collaborator
|
/build |
Collaborator
|
/build |
1 similar comment
Collaborator
|
/build |
cliffburdick
approved these changes
Jun 2, 2025
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.