-
Notifications
You must be signed in to change notification settings - Fork 18
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
WIP: feat: integrate simp_mem with sym_n #179
base: main
Are you sure you want to change the base?
Conversation
ca521ce
to
e00ea82
Compare
@alexkeizer comment addressed! |
@alexkeizer is this an LGTM from you? |
…rue. In particular, run only once, and set other profiler-related options
Traces cause less clutter in the infoview, and still give a decent enough output in batch mode as well
This way, we don't get old data because of lake's caching. We still incorporate all benchmark files in the `Benchmarks` data, but only to ensure we build all dependencies; we disable running the actual benchmark when run with `lake build Benchmarks`
This target runs all the same benchmarks, but with the profiler option enabled
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.
LGTM as a starting point!
Tactics/Reflect/MemoryEffects.lean
Outdated
/-- Create a trace node in trace class (i.e. `set_option traceClass true`), | ||
with header `header`, whose default collapsed state is `collapsed`. -/ | ||
def withTraceNode' (header : MessageData) (k : MetaM α) | ||
(collapsed : Bool := true) | ||
(traceClass : Name := `Tactic.sym) : MetaM α := | ||
Lean.withTraceNode traceClass (fun _ => return header) k (collapsed := collapsed) | ||
|
||
/-- Create a trace note that folds `header` with `(NOTE: can be large)`, | ||
and prints `msg` under such a trace node. | ||
-/ | ||
def traceLargeMsg (header : MessageData) (msg : MessageData) : MetaM Unit := | ||
withTraceNode' m!"{header} (NOTE: can be large)" do | ||
trace[Tactic.sym] msg |
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.
Should these go to some more common file? I'm also not a huge fan of priming names, how about SymM.withTraceNode
or some other similar namespace?
These tags show up in the profile (unlike the message itself)
This help when profiling `sym_n`, because the threshold is applied to each step individually
This help when profiling `sym_n`, because the threshold is applied to each step individually
…step in `sym_n`. This unfortunately does not buy us much, as aggregation for 500 already seems to hit both the recursion limit and heartbeat budget, by itself.
Useful to profile extreme slowdowns, which cause even the 75 step benchmark to timeout
Co-authored-by @bollu<[email protected]>
Co-authored-by @bollu<[email protected]>
1cb884f
to
40cb6f2
Compare
@bollu I separated out the |
077b5da
to
6295e15
Compare
### Description: Extracted from #179, stacked on #220. We extract out memory-effects related code from AxEffects into a new MemoryEffects structure. This PR is purely a non-functional change, but will serve as the starting point of integrating simp_mem with sym_n. The current simplification is effectively a no-op, since the proof state is not massaged to the way `simp_mem` wants it to be. Subsequent PRs will focus on massaging the goal state to be as `simp_mem` likes, and then trying to symbolically simplify the memory expression we see. ### Testing: What tests have been run? Did `make all` succeed for your changes? Was conformance testing successful on an Aarch64 machine? yes ### 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 @bollu<[email protected]> --------- Co-authored-by: Shilpi Goel <[email protected]>
Description:
This PR is stacked on #222.
This PR starts the integration, by adding a call to
simp_mem
to the effect aggregation post-processing step ofsym_n
.Testing:
What tests have been run? Did
make all
succeed for your changes? Wasconformance testing successful on an Aarch64 machine?
Yes,
make all
succeeds.License:
By submitting this pull request, I confirm that my contribution is
made under the terms of the Apache 2.0 license.
NOTE: this PR is owned by @bollu, I (alex) merely opened it because we started pairing on my machine