Skip to content

Conversation

@bollu
Copy link
Contributor

@bollu bollu commented Oct 4, 2024

No description provided.

@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 Oct 4, 2024
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Oct 4, 2024

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 5dea30f169b91cdda9a3903a7a9d125e0f075605 --onto a4fda010f3d44c02393d5afd5cf05509989daf63. (2024-10-04 20:01:17)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 5dea30f169b91cdda9a3903a7a9d125e0f075605 --onto 9dac514c2fc80d3f60076314ad30a993a7b2c22f. (2024-10-07 22:23:28)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 248864c716e4276da7135de2b624a7b6b198f50c --onto 3e75d8f74297bc258352f8d89f71496aacefe7ae. (2024-10-08 20:12:54)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 248864c716e4276da7135de2b624a7b6b198f50c --onto b814be6d6a5334784b172db15fd7fea39b4e3233. (2024-10-10 04:35:50)

@hargoniX
Copy link
Contributor

hargoniX commented Oct 4, 2024

!bench

@hargoniX
Copy link
Contributor

hargoniX commented Oct 4, 2024

Oh this is not going to work yet, you need to add it to the bench configuration of course, my bad.

@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit 4bf37d0.
There were significant changes against commit 5dea30f:

  Benchmark       Metric          Change
  ===============================================
- bv_decide_mul   branch-misses     2.9% (16.5 σ)

@hargoniX
Copy link
Contributor

hargoniX commented Oct 7, 2024

!bench

@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit d4808ba.
The entire run failed.
Found no significant differences.

@hargoniX
Copy link
Contributor

hargoniX commented Oct 7, 2024

Typo in your file name.

@bollu bollu force-pushed the omega-benchmarks branch from 4070279 to 5eaf27f Compare October 8, 2024 19:52
@hargoniX
Copy link
Contributor

hargoniX commented Oct 8, 2024

!bench

@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit 5eaf27f.
There were significant changes against commit 248864c:

  Benchmark       Metric       Change
  ============================================
- bv_decide_mul   task-clock     1.2% (10.7 σ)
- bv_decide_mul   wall-clock     1.7% (20.9 σ)

@bollu
Copy link
Contributor Author

bollu commented Oct 8, 2024

omega10 claims to take 3.3s in instantiate metavars from inside VScode/nvim, but externally when run with lean, takes 195ms. Is this a time leak?

I tried to measure this with an actual watch, but I would like a more reliable method that an literal wall clock to measure difference between time-in-IDE versus time-in-batch (this is easy, use time).

@hargoniX
Copy link
Contributor

hargoniX commented Oct 8, 2024

!bench

@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit f14c278.
There were no significant changes against commit 248864c.

@shigoel
Copy link

shigoel commented Oct 8, 2024

For sanity checking, I reproduced @bollu's benchmarks for omega10.lean. The numbers agree.

In batch mode:

lean omega10.lean
omega10.lean:12:1: warning: unused variable `h_upper_bound`
note: this linter can be disabled with `set_option linter.unusedVariables false`
tactic execution of Lean.Parser.Tactic.omega took 944ms
instantiate metavars took 214ms
share common exprs took 210ms
type checking took 373ms
elaboration took 103ms
cumulative profiling times:
	attribute application 0.00108ms
	elaboration 103ms
	fix level params 8.81ms
	instantiate metavars 214ms
	linting 26.1ms
	parsing 1.03ms
	process pre-definitions 64.9ms
	share common exprs 210ms
	simp 20.6ms
	tactic execution 946ms
	type checking 373ms
	typeclass inference 62.2ms

In VSCode:

tactic execution of Lean.Parser.Tactic.omega took 951ms
instantiate metavars took 2.63s
share common exprs took 1.03s
type checking took 472ms
linting took 124ms
elaboration took 631ms

@bollu bollu marked this pull request as ready for review October 9, 2024 00:48
@bollu
Copy link
Contributor Author

bollu commented Oct 9, 2024

I'm not sure how to get these files tracked on http://speed.lean-fro.org/lean4/run-detail/b07e1b73-1c45-4917-9065-41b479f55c6c. I guess that someone will need to teach it to also track speedcenter tests labeled omega?

shigoel added a commit to leanprover/LNSym that referenced this pull request Oct 9, 2024
…g inf. (#223)

### Description:

This PR replaces `bv_omega` with `bv_omega_bench`, which is used to
write benchmarking results into a user-specified filepath. This enables
us to extract out benchmarks to be upstreamed, as begun in
leanprover/lean4#5622.

We make the file path, whether the benchmark run is enabled or not, and
the minimum time necessary to be added to the benchmark all
user-configurable parameters.


### Testing:

What tests have been run? Did `make all` succeed for your changes? Was
conformance testing successful on an Aarch64 machine?

### License:

By submitting this pull request, I confirm that my contribution is
made under the terms of the Apache 2.0 license.

---------

Co-authored-by: Shilpi Goel <[email protected]>
Shell: 1.59s versus VSCode: 18.5s for "instantiate metavars".

tactic execution of Lean.Parser.Tactic.omega took 4.3s
instantiate metavars took 1.97s
share common exprs took 1.59s
type checking took 1.35s
process pre-definitions took 1.85s
linting took 127ms
elaboration took 690ms
cumulative profiling times:
    attribute application 0.00283ms
    elaboration 690ms
    fix level params 46.1ms
    instantiate metavars 1.97s
    linting 127ms
    parsing 2.07ms
    process pre-definitions 1.85s
    share common exprs 1.59s
    simp 18.7ms
    tactic execution 4.3s
    type checking 1.35s
    typeclass inference 299ms

tactic execution of Lean.Parser.Tactic.omega took 4.08s
instantiate metavars took 18.5s
share common exprs took 5.04s
type checking took 1.09s
process pre-definitions took 1.14s
linting took 382ms
elaboration took 3.06s
@bollu
Copy link
Contributor Author

bollu commented Oct 10, 2024

I added an example that shows a fairly dramatic difference in time between the shell and VSCode:

Shell: 1.59s versus VSCode: 18.5s for "instantiate metavars".


tactic execution of Lean.Parser.Tactic.omega took 4.3s
instantiate metavars took 1.97s
share common exprs took 1.59s
type checking took 1.35s
process pre-definitions took 1.85s
linting took 127ms
elaboration took 690ms
cumulative profiling times:
attribute application 0.00283ms
elaboration 690ms
fix level params 46.1ms
instantiate metavars 1.97s
linting 127ms
parsing 2.07ms
process pre-definitions 1.85s
share common exprs 1.59s
simp 18.7ms
tactic execution 4.3s
type checking 1.35s
typeclass inference 299ms

tactic execution of Lean.Parser.Tactic.omega took 4.08s
instantiate metavars took 18.5s
share common exprs took 5.04s
type checking took 1.09s
process pre-definitions took 1.14s
linting took 382ms
elaboration took 3.06s

@leanprover-bot leanprover-bot added the P-high We will work on this issue label Oct 18, 2024
@kim-em kim-em self-assigned this Oct 29, 2024
@bollu bollu closed this Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P-high We will work on this issue 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.

6 participants