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

Avoid bounds checking where it is safe to do so #656

Merged
merged 9 commits into from
Nov 15, 2024

Conversation

efaulhaber
Copy link
Member

@efaulhaber efaulhaber commented Nov 8, 2024

This PR and trixi-framework/PointNeighbors.jl#74 yield a ~3% speedup on a Threadripper 3990X and a ~42% speedup on an Nvidia H100. Interestingly, there is no difference on an Nvidia RTX 3090 with FP64 (probably limited by something else), but it benefits even more from inbounds on FP32 with a 60% speedup.

grafik

@efaulhaber efaulhaber marked this pull request as ready for review November 12, 2024 17:56
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 68.73%. Comparing base (95aa1c4) to head (f2b63bd).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/schemes/fluid/viscosity.jl 60.00% 2 Missing ⚠️
...fluid/weakly_compressible_sph/density_diffusion.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #656      +/-   ##
==========================================
- Coverage   68.73%   68.73%   -0.01%     
==========================================
  Files          86       86              
  Lines        5278     5280       +2     
==========================================
+ Hits         3628     3629       +1     
- Misses       1650     1651       +1     
Flag Coverage Δ
unit 68.73% <90.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@efaulhaber efaulhaber self-assigned this Nov 14, 2024
@svchb svchb enabled auto-merge (squash) November 15, 2024 10:30
@svchb svchb merged commit 969d986 into trixi-framework:main Nov 15, 2024
14 checks passed
LasNikas pushed a commit to LasNikas/TrixiParticles.jl that referenced this pull request Nov 18, 2024
* Avoid bounds checking where it is safe to do so

* Avoid one more bounds check in density diffusion

* Reformat code

* Use `extract_svector` from PointNeighbors.jl

* Revert 09ab7ba

* Fix tests
LasNikas pushed a commit to LasNikas/TrixiParticles.jl that referenced this pull request Nov 18, 2024
* Avoid bounds checking where it is safe to do so

* Avoid one more bounds check in density diffusion

* Reformat code

* Use `extract_svector` from PointNeighbors.jl

* Revert 09ab7ba

* Fix tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants