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

[Tuner] Allow passing extra TD specs during tuning #925

Closed
wants to merge 1 commit into from

Conversation

Max191
Copy link
Contributor

@Max191 Max191 commented Feb 6, 2025

Adds a new flag to libtuner --extra-spec-file, which allows specifying a path for an additional tuning spec to use during compilation. This allows the tuner to account for already tuned shapes when compiling models, which can have an affect on what the optimal candidate is.

Another flag is added to the simple tuner (--simple-best-spec-output-path), which specifies a path to dump the final best spec after tuning. If stop-after is set to stop after dispatch benchmarking, then it will dump the best dispatch tuning spec, and otherwise the top model tuning spec will be saved.

These 2 flags together now allows tuning loops to be set up where a full tuning spec can be generated automatically/directly from tuning several dispatches in a loop, by dumping the spec from the previous dispatch, and passing it to the tuning for the next dispatch. This has 2 benefits:

  1. We can account for other tuned dispatches when building a spec.
  2. The concatenated spec will be automatically generated by the tuner, removing the manual concatenation step at the end of the tuning process.

@Max191 Max191 requested review from kuhar and bangtianliu February 6, 2025 17:54
@Max191
Copy link
Contributor Author

Max191 commented Feb 6, 2025

Leaving this as a draft for now, since it needs tests.

@Max191 Max191 closed this Feb 6, 2025
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.

1 participant