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

Support user-defined scheduler #431

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

yihozhang
Copy link
Collaborator

@yihozhang yihozhang commented Oct 4, 2024

To support user-defined schedulers, this PR does a few things

  • Expose a safe set of timestamp APIs
  • Small tweak to EGraph::run_actoins to make it more ergonomic
  • Allow associating rules with properties using the :prop "prop-name" literal syntax. This is useful for passing user-defined scheduling parameters to the scheduler.
  • Fixed a bug that ignores user-provided rule names (closes :name field of a rule is not used #323) and a bug that creates rules with duplicate names when semi-naive transformation
  • Add a with-scheduler keyword to the schedule DSL
  • Move scheduling-related functions to a separate scheduler.rs
  • Exposed scheduler as a trait similar to egg.
  • Implemented an example Backoff scheduler that has exact the same behavior as egg's backoff scheduler on the math microbenchmark

Currently, the following command is supported:

(run-schedule
  (repeat 5
    (with-scheduler (simple)
      (repeat 5 (run analysis)))
    (with-scheduler (backoff)
      (repeat 5 (run optimization))))

@yihozhang yihozhang requested a review from a team as a code owner October 4, 2024 06:46
@yihozhang yihozhang requested review from ajpal and removed request for a team October 4, 2024 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

:name field of a rule is not used
1 participant