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

BUG: Fix CSR/CSC matmul #660

Merged
merged 1 commit into from
Apr 8, 2024
Merged

BUG: Fix CSR/CSC matmul #660

merged 1 commit into from
Apr 8, 2024

Conversation

mtsokol
Copy link
Collaborator

@mtsokol mtsokol commented Apr 8, 2024

Hi @hameerabbasi,

I noticed that matmul for CSR/CSC in sparse is broken:

import sparse
import scipy.sparse as sps

arr_csr = sps.random_array((10, 10), format='csr')
sparse_csr = sparse._compressed.CSR.from_scipy_sparse(arr_csr)

sparse_csr @ sparse_csr

throws a ValueError. This PR fixes transpose for _compressed 2D formats.

@mtsokol mtsokol added the bug Indicates an unexpected problem or unintended behavior label Apr 8, 2024
@mtsokol mtsokol self-assigned this Apr 8, 2024
@mtsokol mtsokol requested a review from hameerabbasi April 8, 2024 14:07
@hameerabbasi hameerabbasi enabled auto-merge (squash) April 8, 2024 14:11
Copy link

github-actions bot commented Apr 8, 2024

Test Results

5 913 tests  +8   5 880 ✅ +9   7m 2s ⏱️ +43s
    1 suites ±0      33 💤  - 1 
    1 files   ±0       0 ❌ ±0 

Results for commit 833e3b1. ± Comparison against base commit 18c1596.

This pull request skips 2 and un-skips 3 tests.
sparse.pydata_backend.tests.test_coo ‑ test_reductions_float16[i4-None-sum-kwargs0]
sparse.pydata_backend.tests.test_coo ‑ test_reductions_float16[i8-None-sum-kwargs0]
sparse.pydata_backend.tests.test_compressed ‑ test_reductions_float16[f4-None-sum-kwargs0]
sparse.pydata_backend.tests.test_compressed ‑ test_reductions_float16[i4-None-mean-kwargs1]
sparse.pydata_backend.tests.test_compressed ‑ test_reductions_float16[i8-None-sum-kwargs0]

♻️ This comment has been updated with latest results.

@hameerabbasi hameerabbasi merged commit 361a078 into main Apr 8, 2024
10 checks passed
@hameerabbasi hameerabbasi deleted the fix-csr-matmul branch April 8, 2024 14:17
@hameerabbasi
Copy link
Collaborator

Thanks for the fix, @mtsokol!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants