Repository navigation
Conversation
spencerpatty
approved these changes
Oct 2, 2025
spencerpatty
left a comment
There was a problem hiding this comment.
LGTM thansk for making this update (we should denote that it should coincide with 2025.2 release ... do we need to keep both solutions there with macro conditionals that check what version of MKL it is built against ?
Author
Done. The 2025.3 version of the example will build and run without warning even when using previous oneMKL releases. This is not required but nice to have, and it makes it visible that the |
andrewtbarker
approved these changes
Oct 15, 2025
chuanyuf
added a commit
that referenced
this pull request
Jun 24, 2026
…se_cg_example Add nnz argument to set_csr_data in sparse CG examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change in sparse_cg sample examples required for the 2025.3 tag
Description
Add
nnz(number of non-zero elements in the sparse matrix) to theset_csr_datacall, to be aligned with the API's updated signature in the oneMKL 2025.3 release, and to prevent build warnings when using the deprecated API withoutnnz.Type of change
set_csr_dataAPI still works, but there should be no warnings when building the example.How Has This Been Tested?
I used
makeon the command line to build and run the example on a PVC Linux system, using a oneMKL 2025.3 Release Candidate build.Note that:
running the example without this fix against oneMKL 2025.3 will work but there will be warnings:
sparse_cg.cpp:383:44: warning: 'set_csr_data' is deprecated: Use oneapi::mkl::sparse::set_csr_data(queue, spmat, nrows, ncols, nnz, ...) instead..running the example with this fix against oneMKL 2025.2 (or previous releases) will cause a build failure.
Command Line
oneapi-cli
Visual Studio
Eclipse IDE
VSCode
Building:
Running: