Skip to content

Lanczos Solver with COO input and cusparse wrappers - #2851

Merged
rapids-bot[bot] merged 11 commits into
NVIDIA:mainfrom
aamijar:lanczos-coo-input
Nov 6, 2025
Merged

rapids-bot[bot] merged 11 commits into
NVIDIA:mainfrom
aamijar:lanczos-coo-input

Conversation

@aamijar

@aamijar aamijar commented Oct 30, 2025 •

Copy link
Copy Markdown
Member

Resolves #2832 and Resolves #2833

This PR adds support for COO matrix input for the Lanczos Solver.

The AType template parameter is added to support both COO and CSR.

The lanczos solver uses cusparse for spmv computations. We use raft to create a cusparse matrix type with create_descriptor.

To enable coo support we need to add cusparseCreateCOO wrappers and a overload for create_descriptor.

@aamijar aamijar self-assigned this Oct 30, 2025
@aamijar aamijar added the non-breaking Non-breaking change label Oct 30, 2025
@aamijar aamijar moved this from Todo to In Progress in Unstructured Data Processing Oct 30, 2025
@aamijar aamijar added the improvement Improvement / enhancement to an existing function label Oct 30, 2025
@aamijar aamijar changed the title Lanczos Solver with COO input and cusparseCreateCOO wrappers Lanczos Solver with COO input and cusparse wrappers Oct 30, 2025

@viclafargue viclafargue left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, just need some docs updates.

Comment on lines +47 to +48
* @tparam index_type_t the type of data used for indexing.
* @tparam value_type_t the type of data used for weights, distances.

@viclafargue viclafargue Nov 4, 2025 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please update the documentation with IndexTypeT, ValueTypeT and please add AType saying it has to either be a RAFT COO or CSR matrix. Also A can be either not just CSR. I would even say that the public function that should be referenced in the documentation should not be a template, but two different functions in the header file. Also, is the other lanczos_compute_smallest_eigenvectors function still supposed to receive its rows and columns as a CSR matrix. Please document this.

@aamijar aamijar Nov 4, 2025 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I have changed the public function to have a specific type of raft::device_coo_matrix_view instead of template type for more clarity. I have also updated the docs. a73f587

@cjnolet

cjnolet commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

/merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

cusparseCreateCoo wrappers with create_descriptor Lanczos Solver with COO input

3 participants