← 返回首页
1918 sparse matrix not updated in for loop in opencl by christophe-murphy · Pull Request #3602 · arrayfire/arrayfire · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

1918 sparse matrix not updated in for loop in opencl#3602

Merged
christophe-murphy merged 3 commits into
masterfrom
1918-sparse-matrix-not-updated-in-for-loop-in-opencl
Jan 8, 2025
Merged

1918 sparse matrix not updated in for loop in opencl#3602
christophe-murphy merged 3 commits into
masterfrom
1918-sparse-matrix-not-updated-in-for-loop-in-opencl

Conversation

Copy link
Copy Markdown
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 linked an issue Sep 11, 2024 that may be closed by this pull request
edwinsolisf self-requested a review December 30, 2024 20:29
Copy link
Copy Markdown
Contributor

edwinsolisf left a comment

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Tested changes on windows with OpenCL

christophe-murphy merged commit 279d0ea into master Jan 8, 2025
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

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

2 participants

Footer

© 2026 GitHub, Inc.