Skip to content
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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Kha
Copy link
Member

@Kha Kha commented Jan 24, 2025

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.

@Kha
Copy link
Member Author

Kha commented Jan 24, 2025

!bench

@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Jan 24, 2025
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Jan 24, 2025

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 757899a7d179b3fd845d3e03031bbe360c80ef51 --onto c70f4064b4041dee70925bddbef095ebb2b36d7d. (2025-01-24 19:04:29)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 757899a7d179b3fd845d3e03031bbe360c80ef51 --onto 62788395345c7f145714157c138acd0e137ab716. (2025-01-26 20:08:50)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 757899a7d179b3fd845d3e03031bbe360c80ef51 --onto 20c616503abe5ce4253c56dbcd7766a91c675ba0. (2025-01-29 13:08:18)

@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit 63ac64b.
There were significant changes against commit 757899a:

  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 σ)

@Kha Kha force-pushed the push-wxvvorszpxsw branch 2 times, most recently from e625ead to bc19fbf Compare January 26, 2025 19:45
@Kha Kha changed the title feat: asynchronous code generation feat: asynchronous code generation Jan 29, 2025
@Kha Kha force-pushed the push-wxvvorszpxsw branch from bc19fbf to b08b7ef Compare January 29, 2025 12:34
@Kha
Copy link
Member Author

Kha commented Jan 29, 2025

@zwarich FYI, you might want to take a look even though this interacts with the code generator only superficially, in compileDecls. The unification of that and compileDecl is desirable, I hope :) .

@Kha Kha force-pushed the push-wxvvorszpxsw branch from b08b7ef to 9716893 Compare January 29, 2025 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants