Skip to content
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

[oneMKL][SpBLAS] Add nnz arg to oneapi::mkl::sparse::set_csr_data() API #512

Conversation

gajanan-choudhary
Copy link
Contributor

@gajanan-choudhary gajanan-choudhary commented Nov 4, 2023

Changes

  • Adds intType nnz argument to oneapi::mkl::sparse::set_csr_data() API.
  • Changes num_rows, num_cols to nrows, ncols, to also avoid using num_nz instead of nnz that we are proposing.
  • Updates CSR matrix description with nnz definition, usage.

Need

  • cuSPARSE contains an nnz argument in their cusparseCreateCsr() API. Adding the cuSPARSE backend when implementing the oneMKL specification will require workarounds if the nnz argument is not added to the specification. In most cases, nnz is known (except when it is being found as part of the API such as sparse + sparse = sparse or sparse * sparse = sparse matrix operations, but note that such APIs are currently not part of the oneAPI/oneMKL specification.)
  • We would like this change to be part of the oneMKL spec version 1.3 that's to be released soon.

Copy link
Contributor

@spencerpatty spencerpatty left a comment

Choose a reason for hiding this comment

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

pending decision about const or no on sizes, I approve.

@gajanan-choudhary
Copy link
Contributor Author

@rscohn2, @mkrainiuk, could one of you please merge this PR in by EOD today so it can go into spec v1.3? @spencerpatty reached out to me and said he might be unavailable today to merge the PR in.

@rscohn2 rscohn2 merged commit 057d192 into uxlfoundation:main Nov 6, 2023
3 checks passed
@gajanan-choudhary gajanan-choudhary deleted the oneMKL/SpBLAS/gajanan-choudhary/add-nnz-to-set_csr_data branch November 6, 2023 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants