Skip to content

Add SpMV test for DIA-I and DIA-J #974

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

Merged
merged 2 commits into from
Jun 2, 2025
Merged

Add SpMV test for DIA-I and DIA-J #974

merged 2 commits into from
Jun 2, 2025

Conversation

aartbik
Copy link
Collaborator

@aartbik aartbik commented May 31, 2025

No description provided.

@aartbik aartbik requested review from cliffburdick and Copilot May 31, 2025 00:58
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

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});
@cliffburdick
Copy link
Collaborator

/build

@cliffburdick
Copy link
Collaborator

/build

1 similar comment
@cliffburdick
Copy link
Collaborator

/build

@cliffburdick cliffburdick merged commit 1b2b771 into NVIDIA:main Jun 2, 2025
1 check passed
@cliffburdick cliffburdick deleted the bik branch June 2, 2025 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants