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

add notebook for benchmarking top_hat #201

Merged
merged 6 commits into from
Jul 24, 2024
Merged

add notebook for benchmarking top_hat #201

merged 6 commits into from
Jul 24, 2024

Conversation

haesleinhuepf
Copy link
Member

In this notebook you can see that top-hat-box in the non-prototype is much faster than in in the protoype. Any ideas why? This could be interesting for the paper, and potentially speed up other operations too.

@StRigaud
Copy link
Member

That's .... suspicious (or great, idk).

I run the notebook on my GPU:

  • the prototype is always slower which is not that clear for the disk top-hat for you.
  • sphere are more or less at the same speed.
  • I also got a factor 2 for the box top-hat.
  • I tested that both box top hat produce the same output (quick test say yes)

I cannot explain the speed gain, but I am happy for it I guess.

Can you make sure all is correct ?

@StRigaud
Copy link
Member

@haesleinhuepf, this could be related to a possible acceleration from the separable filters, could be interesting to look at other separable filter to see if we see a similar speed up.

@StRigaud
Copy link
Member

StRigaud commented Jul 2, 2024

@haesleinhuepf this is because of the data type!

If you run the filters on float dtype, prototype and pyclesperanto are approximatively on the same speed.
If you run the filters on uint8 dtype, pyclesperanto wins. My guess is that prototype still push/pull all buffer as float in the GPU. So either it is quicker for the GPU to run computation on uint8 than on float, or it is simply the gain in the push/pull operation gain with uint8.

See my updates on the notebook.

PS: also you inversed the disk and square for the skimage footprint. The sphere is REALLY slow for me ....

@codecov-commenter
Copy link

codecov-commenter commented Jul 2, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.91%. Comparing base (5312515) to head (b0b9478).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #201   +/-   ##
=======================================
  Coverage   84.91%   84.91%           
=======================================
  Files          18       18           
  Lines        1830     1830           
=======================================
  Hits         1554     1554           
  Misses        276      276           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@StRigaud
Copy link
Member

ready to be merge, unless we want to add more

@StRigaud StRigaud merged commit 5a21575 into main Jul 24, 2024
3 checks passed
@StRigaud StRigaud deleted the benchmarking_top_hat branch July 24, 2024 15:35
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.

3 participants