-
Notifications
You must be signed in to change notification settings - Fork 244
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
Benchmarking each step of the compilation process #4658
Comments
|
@TomAFrench Thank you good to know I forgot about that. I will change this issue to make a tool similar to gate counts check then. |
I just ran that and it is slightly hard to discern exactly the timings as everything is just timestamped. Perhaps it would be worth to still have a command that pretty prints some benchmarking info. |
Can we have the trace output the difference between enter and exit?:
|
# Description ## Problem\* Resolves #4658 ## Summary\* I was already timing things for a separate issue so I decided to push this PR. I felt this provided a nice temporary solution. If we deem that the `tracing` crate can still be used for pretty printing the timings of each codegen pass we can switch to that in a follow-up, and for now this provides an easy way to check the timings of each codegen pass. Example output: ``` After Defunctionalization:: 0 ms After Removing Paired rc_inc & rc_decs:: 0 ms After Inlining:: 0 ms After Mem2Reg:: 0 ms After Assert Constant:: 0 ms After Unrolling:: 13 ms After Simplifying:: 0 ms After Flattening:: 9 ms After Removing Bit Shifts:: 0 ms After Mem2Reg:: 19 ms After Constant Folding:: 3 ms After Constraint Folding:: 3 ms After Dead Instruction Elimination:: 0 ms SSA to Brillig: 0 ms SSA to ACIR: 14 ms ``` ## Additional Context ## Documentation\* Check one: - [ ] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist\* - [ ] I have tested the changes locally. - [ ] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings. --------- Co-authored-by: jfecher <[email protected]>
# Description ## Problem\* Resolves #4658 ## Summary\* I was already timing things for a separate issue so I decided to push this PR. I felt this provided a nice temporary solution. If we deem that the `tracing` crate can still be used for pretty printing the timings of each codegen pass we can switch to that in a follow-up, and for now this provides an easy way to check the timings of each codegen pass. Example output: ``` After Defunctionalization:: 0 ms After Removing Paired rc_inc & rc_decs:: 0 ms After Inlining:: 0 ms After Mem2Reg:: 0 ms After Assert Constant:: 0 ms After Unrolling:: 13 ms After Simplifying:: 0 ms After Flattening:: 9 ms After Removing Bit Shifts:: 0 ms After Mem2Reg:: 19 ms After Constant Folding:: 3 ms After Constraint Folding:: 3 ms After Dead Instruction Elimination:: 0 ms SSA to Brillig: 0 ms SSA to ACIR: 14 ms ``` ## Additional Context ## Documentation\* Check one: - [ ] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist\* - [ ] I have tested the changes locally. - [ ] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings. --------- Co-authored-by: jfecher <[email protected]>
Problem
Every so often we have bugs that arise such as #4395 where users cannot compile certain valid code due to compile time blowup.
It would be easier to nail down and debug these programs if we had an option to similar to
--show-ssa
that displayed how much time we are spending on each compilation pass.Happy Case
We should be able to discern how much time is spent per compilation step.
Ideally after this is done, we could have a similar tool to the gate checks count that displays how compilation times increase/decrease on certain tests due to PRs.
Project Impact
None
Impact Context
No response
Workaround
None
Workaround Description
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered: