Repository navigation
ci: the optimized gate builds at opt-level = 2 - #110
Merged
Merged
Conversation
What this job needs from the shipping profile is `debug-assertions` and
`overflow-checks` off and a build the compiler optimizes; `opt-level = 3` itself is a
shipping knob. Measured on four CPUs, the shape of a hosted runner, over the same
package and test targets with warm dependencies:
opt-level = 1 26.4 s auto-vectorization off
opt-level = 2 34.3 s <- this profile
opt-level = 3 36.2 s what `release` uses
Level 2 keeps vectorization, which is the codegen feature the packed kernels are
built around, and level 3's last few per cent buy a gate nothing. The shipping
profile is still built, linked and run by `c-consumer`.
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.
Follow-up to #109, from your suggestion: the optimized gate need not build at the shipping
opt-leveleither.What this job needs from the shipping profile is the other half --
debug-assertionsandoverflow-checksoff, and a build the compiler optimizes rather than a debug one -- whichrelease-teststill inherits fromrelease.opt-level = 3is a shipping knob.Measured on four CPUs, the shape of a hosted runner, over the same package and its test targets with warm dependencies:
releaseusesLevel 2 keeps vectorization, the codegen feature the packed kernels are built around, for 5% over level 1; level 3's last 5% buys a gate nothing. (For reference, thin LTO with one codegen unit -- the other two shipping knobs -- cost 4.2x: 72.6 s against 17.1 s on a 24-thread host.)
The shipping profile is still built, linked and run by
c-consumer. Checks:cargo test -p tcontract --profile release-test(34 suites),cargo fmt --all -- --check,cargo clippy --workspace --all-targets -- -D warnings.