Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Provide feedback

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

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[WIP] CSR/ CSC Elemwise#465

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
ivirshup wants to merge11 commits intopydata:main
base:main
Choose a base branch
Loading
fromivirshup:elemwise
Draft

Conversation

ivirshup
Copy link
Contributor

@ivirshupivirshup commentedApr 24, 2021
edited
Loading

Very WIP draft PR for elemwise operations on CSR and CSC arrays.

Currently just implements broadcasting operations between compressed 2d arrays. Cases that would be covered by a full implementation:

  • Unary broadcasting (e.g.-a)
  • Binary broadcasting
    • compressed_2d + compressed_2d
    • compressed_2d + scalar
    • compressed_2d + dense_1d
    • compressed_2d + sparse_1d

A quick benchmark:

importsparsefromsparse._compressedimportCSR,CSCgcxs_a=sparse.random((10000,20000),.01,format="gcxs")gcxs_b=sparse.random((10000,20000),.01,format="gcxs")csr_a=CSR(gcxs_a)csr_b=CSR(gcxs_b)scipy_a=csr_a.to_scipy_sparse()scipy_b=csr_b.to_scipy_sparse()
%timeitgcxs_a+gcxs_b# 999 ms ± 10.2 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)%timeitcsr_a+csr_b# 32.2 ms ± 1.9 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)%timeitscipy_a+scipy_b# 27.5 ms ± 894 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)

Should provide some insight for#460

@hameerabbasi
Copy link
Collaborator

Thanks for this,@ivirshup. Let me know if you need any help or direction.

@codecov
Copy link

codecovbot commentedJul 20, 2023
edited
Loading

Codecov Report

Attention: Patch coverage is64.42953% with53 lines in your changes missing coverage. Please review.

Project coverage is 90.91%. Comparing base(096f9b0) to head(9b7f22c).
Report is 138 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@##             main     #465      +/-   ##==========================================- Coverage   92.15%   90.91%   -1.24%==========================================  Files          20       21       +1       Lines        3313     3445     +132     ==========================================+ Hits         3053     3132      +79- Misses        260      313      +53

Copy link

@github-advanced-securitygithub-advanced-securitybot left a comment

Choose a reason for hiding this comment

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

CodeQL found more than 10 potential problems in the proposed changes. Check theFiles changed tab for more details.

@hameerabbasi
Copy link
Collaborator

@ivirshup Do you plan to continue this?

@ivirshup
Copy link
ContributorAuthor

I have some interest but probably not time. I would love for someone to take it over.

IIRC the biggest stumbling block was dispatch. If that could get worked out by someone else, I'd be interested in collaborating.

@DeaMariaLeonDeaMariaLeon added the enhancementIndicates new feature requests labelAug 5, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
enhancementIndicates new feature requests
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@ivirshup@hameerabbasi@DeaMariaLeon

[8]ページ先頭

©2009-2025 Movatter.jp