Skip to content

COO input for lanczos solver should be sorted #2874

@aamijar

Description

@aamijar

While working on rapidsai/cuml#7225 and with the new COO input support recently introduced in the lanczos solver #2832 I came across a important constraint that the COO input must be sorted.

This was a very tricky bug to catch since a COO sparse matrix represents the same underlying matrix whether it is sorted or not. However when running the lanczos solver on an unsorted coo input it would not give good results.
Upon investigating this further I saw that cusparse COO formats actually make the following a requirement
https://docs.nvidia.com/cuda/cusparse/#coordinate-coo

The COO format is assumed to be sorted by row.

However the columns within each row do not need to be sorted.

cuSPARSE supports both sorted and unsorted column indices within a given row.

Since the lanczos solver uses cusparse under the hood we should clearly document that the input should be sorted in the public function header.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions