Repository navigation
qv: inline the renormalizations on NEON - #118
Merged
Merged
Conversation
Out of line, the renormalizations passed their four lane vectors of four registers each through memory both ways on every call. Simd::hot_renorm forces them inline on NEON, which makes QV addition about 15% and multiplication about 11% faster on an Apple M5, with the results unchanged bit for bit.
[Medium impact] This PR appears safe to merge. SummaryThis PR forces
Reviews (1) · Last reviewed commit: "qv: inline the renormalizations on NEON" · Reviewed by Greptile |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #118 +/- ##
=======================================
Coverage 97.12% 97.12%
=======================================
Files 22 22
Lines 14037 14040 +3
=======================================
+ Hits 13633 13636 +3
Misses 404 404 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On NEON,
Simd::hotonly hints, sorenorm4andrenorm5compiled as functions of their own, and each call stored its 16 input registers and loaded its 16 output registers through the stack. The newSimd::hot_renormforces them inline on NEON and ishoton every other backend. The results are unchanged bit for bit.Cycles on an Apple M5 with native QV, new over
main, minimum of five interleaved runs:The release test build takes 560 s of CPU and 1.0 GB at peak, against 536 s and 1.4 GB. Forcing every
hotoperation inline on NEON would also take div and sqrt to about 0.86, but it raises the build to 2117 s and 4.6 GB.Summary by CodeRabbit