-
Notifications
You must be signed in to change notification settings - Fork 459
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
feat: asynchronous code generation #6770
Conversation
!bench |
Mathlib CI status (docs):
|
Here are the benchmark results for commit 63ac64b. Benchmark Metric Change
====================================================================
- Init.Prelude async branches 2.3% (275.1 σ)
- Init.Prelude async instructions 1.8% (253.4 σ)
- bv_decide_inequality.lean task-clock 1.9% (10.2 σ)
- ilean roundtrip parse 3.0% (24.3 σ)
- parser task-clock 4.0% (17.9 σ)
- parser wall-clock 4.0% (18.3 σ)
- stdlib attribute application 1.9% (18.2 σ)
- stdlib type checking 2.0% (210.4 σ) |
e625ead
to
bc19fbf
Compare
bc19fbf
to
b08b7ef
Compare
@zwarich FYI, you might want to take a look even though this interacts with the code generator only superficially, in |
9716893
to
3ace745
Compare
!bench |
3ace745
to
d985e84
Compare
Here are the benchmark results for commit 3ace745. Benchmark Metric Change
============================================================
- Init.Data.List.Sublist async task-clock 1.6% (10.4 σ)
+ Init.Data.List.Sublist async wall-clock -3.1% (-14.6 σ)
- Init.Prelude async branches 1.0% (107.1 σ)
+ big_omega.lean MT task-clock -2.9% (-11.6 σ)
+ big_omega.lean MT wall-clock -2.9% (-13.5 σ)
- stdlib dsimp 4.5% (62.3 σ) |
| [] => false | ||
| (a::as) => a > 0 && f as | ||
|
||
#print f._cstage2 |
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.
@leodemoura @zwarich FYI, because of how the old codegen adds these stage declarations to the environment via C++, ident elaboration will not be able to find them anymore after this PR. The old codegen itself is unaffected. I assume this is acceptable as the new codegen does not use the environment in this way anyway, thus I've removed the single test that accesses them.
d985e84
to
1556ae4
Compare
1556ae4
to
c47e9a9
Compare
!bench |
Here are the benchmark results for commit 0ce68b1. Benchmark Metric Change
==========================================================================
+ Init.Data.List.Sublist async branches -1.8% (-99.1 σ)
+ Init.Data.List.Sublist async instructions -1.5% (-74.6 σ)
+ Init.Prelude async branches -2.1% (-33.8 σ)
+ Init.Prelude async instructions -1.7% (-24.0 σ)
+ big_do task-clock -5.6% (-61.5 σ)
+ big_do wall-clock -5.6% (-64.0 σ)
- big_omega.lean MT task-clock 4.6% (10.3 σ)
- big_omega.lean MT wall-clock 4.6% (10.5 σ)
- binarytrees.st task-clock 5.9% (25.6 σ)
- binarytrees.st wall-clock 5.9% (25.3 σ)
- bv_decide_inequality.lean task-clock 4.1% (64.3 σ)
- bv_decide_inequality.lean wall-clock 4.1% (60.6 σ)
- parser task-clock 5.7% (32.4 σ)
- parser wall-clock 5.7% (31.1 σ)
- rbmap task-clock 8.4% (15.9 σ)
- rbmap wall-clock 8.3% (16.9 σ)
+ stdlib attribute application -1.4% (-20.2 σ)
+ stdlib process pre-definitions -2.9% (-17.8 σ)
+ stdlib tactic execution -3.4% (-104.9 σ)
- unionfind task-clock 8.5% (12.0 σ)
- unionfind wall-clock 8.5% (12.1 σ) |
!bench |
Here are the benchmark results for commit c288ae4. Benchmark Metric Change
=======================================================================
+ Init.Data.List.Sublist async branches -1.9% (-191.1 σ)
+ Init.Data.List.Sublist async instructions -1.5% (-125.0 σ)
+ Init.Data.List.Sublist async task-clock -1.7% (-11.4 σ)
+ Init.Data.List.Sublist async wall-clock -7.0% (-77.1 σ)
+ Init.Prelude async branches -2.2% (-257.9 σ)
+ Init.Prelude async instructions -1.7% (-185.9 σ)
+ Init.Prelude async wall-clock -16.8% (-25.3 σ)
- ilean roundtrip compress 6.1% (34.0 σ)
+ ilean roundtrip parse -3.8% (-10.7 σ)
- ilean roundtrip task-clock 3.4% (19.8 σ)
- ilean roundtrip wall-clock 3.4% (19.1 σ)
- stdlib instantiate metavars 2.3% (20.9 σ) |
This PR enables code generation to proceed in parallel to further elaboration.
It does not aim to make further refinements such as generating code for different declarations in parallel or removing the dependency on kernel checking.