[ONEMKL_SYCL][REF] Add operation_info_t and matrix_opt to more cases and add two examples to cover it#70
Open
spencerpatty wants to merge 3 commits intomainfrom
Open
[ONEMKL_SYCL][REF] Add operation_info_t and matrix_opt to more cases and add two examples to cover it#70spencerpatty wants to merge 3 commits intomainfrom
spencerpatty wants to merge 3 commits intomainfrom
Conversation
… introduce xyz_inspect for many cases, also add two new examples which uses them
spencerpatty
commented
Mar 27, 2026
Comment on lines
+43
to
+47
| #if defined(__INTEL_MKL__) && \ | ||
| ((__INTEL_MKL__ == 2025) && (__INTEL_MKL_MINOR__ == 3) || \ | ||
| (__INTEL_MKL__ > 2025)) | ||
| m.size(), // nnz added in 2025.3, and without deprecated | ||
| #endif |
Contributor
Author
There was a problem hiding this comment.
MKL SYCL api change in 2025.3 adding nnz to csr/csc/bsr and adding coo format which already had nnz in definition.
spencerpatty
commented
Mar 27, 2026
Comment on lines
+146
to
+152
| info.update_impl_(tmp_info.result_shape(), tmp_info.result_nnz()); | ||
| info.state_.a_handle = tmp_info.state_.a_handle; | ||
| info.state_.b_handle = tmp_info.state_.b_handle; | ||
| info.state_.c_handle = tmp_info.state_.c_handle; | ||
| info.state_.descr = tmp_info.state_.descr; | ||
| info.state_.c_rowptr = tmp_info.state_.c_rowptr; | ||
| info.state_.q = tmp_info.state_.q; |
Contributor
Author
There was a problem hiding this comment.
maybe could utilize a copy constructor here ?
spencerpatty
commented
Mar 27, 2026
spencerpatty
commented
Mar 27, 2026
spencerpatty
commented
Mar 27, 2026
spencerpatty
commented
Mar 27, 2026
spencerpatty
commented
Mar 27, 2026
spencerpatty
commented
Mar 27, 2026
spencerpatty
commented
Mar 27, 2026
spencerpatty
commented
Mar 27, 2026
spencerpatty
commented
Mar 27, 2026
spencerpatty
commented
Mar 27, 2026
spencerpatty
commented
Mar 27, 2026
spencerpatty
commented
Mar 27, 2026
Co-authored-by: Spencer Patty <spencer.patty@intel.com>
yhmtsai
requested changes
Apr 1, 2026
Contributor
yhmtsai
left a comment
There was a problem hiding this comment.
Only some nit. Others lgtm.
| add_example(simple_sptrsv) | ||
| add_example(spmm_csc) | ||
| add_example(matrix_opt_example) | ||
| if (ENABLE_ONEMKL_SYCL OR SPBLAS_REFERENCE_BACKEND ) |
Contributor
There was a problem hiding this comment.
Suggested change
| if (ENABLE_ONEMKL_SYCL OR SPBLAS_REFERENCE_BACKEND ) | |
| if (ENABLE_ONEMKL_SYCL OR SPBLAS_REFERENCE_BACKEND) |
nit
Comment on lines
+54
to
+58
| triangular_solve_inspect(a_opt, spblas::upper_triangle_t{}, | ||
| spblas::implicit_unit_diagonal_t{}, b_scaled, x); | ||
|
|
||
| triangular_solve(a_opt, spblas::upper_triangle_t{}, | ||
| spblas::implicit_unit_diagonal_t{}, b_scaled, x); |
Contributor
There was a problem hiding this comment.
I thought we would like to change it. Is this PR to add operation_info_t and matrix_opt only? When we introduce the descriptor, then switch to that?
| "######################"); | ||
| fmt::print("\n\t### Running Advanced SpMM Example:"); | ||
| fmt::print("\n\t###"); | ||
| fmt::print("\n\t### Y = alpha * A * X"); |
Contributor
There was a problem hiding this comment.
Suggested change
| fmt::print("\n\t### Y = alpha * A * X"); |
| auto&& [idx, a_v] = e; | ||
| auto&& [i, k] = idx; | ||
| for (std::size_t j = 0; j < __backend::shape(b)[1]; j++) { | ||
| for (std::size_t j = 0; j < __backend::shape(b)[1]; j++) { // b_row |
Contributor
There was a problem hiding this comment.
Suggested change
| for (std::size_t j = 0; j < __backend::shape(b)[1]; j++) { // b_row | |
| for (std::size_t j = 0; j < __backend::shape(b)[1]; j++) { |
maybe not needed? or move it to before for?
Comment on lines
+146
to
+152
| info.update_impl_(tmp_info.result_shape(), tmp_info.result_nnz()); | ||
| info.state_.a_handle = tmp_info.state_.a_handle; | ||
| info.state_.b_handle = tmp_info.state_.b_handle; | ||
| info.state_.c_handle = tmp_info.state_.c_handle; | ||
| info.state_.descr = tmp_info.state_.descr; | ||
| info.state_.c_rowptr = tmp_info.state_.c_rowptr; | ||
| info.state_.q = tmp_info.state_.q; |
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.
Summary:
1. add spmm_csr and sptrsv_csr examples with more complete API usage models (using operation_info_t and inspect functions)
2. add xyz_inspect and operation_info_t, and matrix_opt to ONEMKL_SYCL backend
3. add several more variants of reference function with more complete set of apis
Merge Checklist: