Skip to content

Conversation

@christophe-murphy
Copy link
Contributor

Fix for issue in the opencl backend where array offsets for the values and/or row/cols arrays are not accounted for when converting a sparse array to a dense one.

Description

A sparse csr matrix may be constructed using arrays for the values and the row and column indices. When these arrays are indexed using the seq method, the offsets into them are stored. These offsets were not being accounted for in the sparse to dense conversion function which can result in incorrect values in the resulting dense matrix. This PR fixes that.
Fixes: #1918

Checklist

  • Rebased on latest master
  • Code compiles
  • Tests pass

…s and/or row/cols arrays are not accounted for when converting a sparse array to a dense one. This can happen when a sparse matrix is constructed using values and/or row/cols arrays that have been indexed using the seq method.
@christophe-murphy christophe-murphy linked an issue Sep 11, 2024 that may be closed by this pull request
@edwinsolisf edwinsolisf self-requested a review December 30, 2024 20:29
Copy link
Contributor

@edwinsolisf edwinsolisf left a comment

Choose a reason for hiding this comment

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

Tested changes on windows with OpenCL

@christophe-murphy christophe-murphy merged commit 279d0ea into master Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sparse matrix not updated in for loop in OpenCL

3 participants