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

SDDMM speedup goal #538

Closed
willow-ahrens opened this issue May 9, 2024 · 8 comments
Closed

SDDMM speedup goal #538

willow-ahrens opened this issue May 9, 2024 · 8 comments

Comments

@willow-ahrens
Copy link
Owner

Lets get a real speedup in pydata/sparse#674

@mtsokol
Copy link
Collaborator

mtsokol commented May 14, 2024

@willow-ahrens We merged pydata/sparse#674 and with Finch v0.6.26 we have x2.5 speedup (It's still away from x100) for NxN arrays where N=10000 and density is 0.0001 compared to both Numba and SciPy! 🎉 Great progress! Thank you!

Finch
Took 8.787564675013224 s.

Numba
Took 22.904020706812542 s.

SciPy
Took 22.59452811876933 s.

https://github.com/pydata/sparse/actions/runs/9078498356/job/24945650514#step:5:299

@willow-ahrens
Copy link
Owner Author

That's great! I'll try to run it in debug mode to see if the autoscheduler can be improved

@willow-ahrens
Copy link
Owner Author

Finch
Took 0.009948968887329102 s.

Numba
Took 0.44066866238911945 s.

SciPy
Took 0.2068446477254232 s.

@mtsokol
Copy link
Collaborator

mtsokol commented May 21, 2024

Wow! This looks amazing!

Did you change any parameters/code in https://github.com/pydata/sparse/blob/main/examples/sddmm_example.py?

@willow-ahrens
Copy link
Owner Author

@willow-ahrens
Copy link
Owner Author

willow-ahrens commented May 21, 2024

I changed some of the code. The issue right now is that the performance of dense matmul is pretty good, so I changed the density and dimensions

@willow-ahrens
Copy link
Owner Author

willow-ahrens commented May 21, 2024

this is a 43x improvement, I think this is good enough to close the issue 🎉 . I am curious what kind of matmul is being used in numba.

@mtsokol
Copy link
Collaborator

mtsokol commented May 21, 2024

x43 is what we needed for sure! Thank you!!!

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

No branches or pull requests

2 participants