-
Notifications
You must be signed in to change notification settings - Fork 120
Add preference to disable LoopVectorization #2295
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
Conversation
Review checklistThis checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging. Purpose and scope
Code quality
Documentation
Testing
Performance
Verification
Created with ❤️ by the Trixi.jl community. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2295 +/- ##
==========================================
- Coverage 96.95% 96.93% -0.02%
==========================================
Files 504 505 +1
Lines 41721 41732 +11
==========================================
+ Hits 40448 40449 +1
- Misses 1273 1283 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! Just a small naming suggestion...
Why is |
src/Trixi.jl
Outdated
# TODO: We should insert !loopinfo !julia.ivdep !julia.simd | ||
# but SimdLoop.compile doesn't deal with nested for loops. | ||
# esc(Base.SimdLoop.compile(body, Symbol("julia.ivdep"))) | ||
return esc(body) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe @turbo
also implies @inbounds
. Right now this slows down simulations quite a bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we go ahead with this PR as it is or would you like to change something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What kind of simulations do you look at to observe the significant slowdown?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ranocha this is ready from my side. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Did you test this locally?
Only for my implicit example I mentioned earlier today. |
Does this often happen when running examples from Trixi.jl or is it just a rare warning? |
This is a rare warning that you may get if you use "unusual types" (like rational numbers or types from Measurements jl) or array types that are not supported by LoopVectorization.jl (like GPU arrays). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Do you have an idea why the threaded CI tests fail? |
Enzyme struggles with differentiation through the code that LoopVectorization
generates.
https://docs.sciml.ai/SciMLSensitivity/stable/faq/#How-do-I-isolate-potential-gradient-issues-and-improve-performance?
Is a good way to check if an Elixir's rhs is differentiable.
I ran into this when playing around with https://github.com/trixi-framework/Trixi.jl/blob/31e3c8fee15d9955af8c7c6a64e3bfcfea1c3e94/examples/p4est_2d_dgsem/elixir_navierstokes_NACA0012airfoil_mach08.jl and SciMLSensitivity.jl