Skip to content

Conversation

@aartbik
Copy link
Collaborator

@aartbik aartbik commented May 30, 2025

DIA-J is most common but DIA-I is used by cuSPARSE legacy

DIA-J is most common but DIA-I is used by cuSPARSE legacy
@aartbik aartbik requested review from cliffburdick and Copilot May 30, 2025 22:05
@cliffburdick
Copy link
Collaborator

/build

Copy link
Contributor

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

This PR generalizes the DIA sparse matrix format to support both DIA-I and DIA-J variants, addressing compatibility with legacy cuSPARSE usage. Key changes include:

  • Conditional kernel invocation updated in matvec_cusparse.h to select between DIAI and DIAJ kernels.
  • New kernel implementations added in matvec.cuh with revisions to loop variable naming.
  • Updated type definitions and tensor creation APIs in sparse_tensor_format.h and make_sparse_tensor.h, as well as corresponding changes in example usage.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
include/matx/transforms/matmul/matvec_cusparse.h Updated kernel dispatch to select DIAI or DIAJ based on format check.
include/matx/kernels/matvec.cuh Added diai_spmv_kernel and diaj_spmv_kernel with loop variable inconsistency.
include/matx/core/sparse_tensor_format.h Introduced new DIAI/DIAJ type definitions and related format changes.
include/matx/core/make_sparse_tensor.h Modified DIA tensor construction to choose between DIAI and DIAJ.
examples/sparse_tensor.cu Updated example calls to reflect the new DIAI/J APIs.

@cliffburdick
Copy link
Collaborator

/build

@aartbik aartbik merged commit d104fec into NVIDIA:main May 31, 2025
1 check was pending
@aartbik aartbik deleted the bik branch May 31, 2025 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants