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] Add unified compilation step for models and dispatches #702

Closed
wants to merge 1 commit into from

Conversation

Max191
Copy link
Contributor

@Max191 Max191 commented Dec 16, 2024

This PR adds a new compile() function for compiling both models and dispatches during tuning. This will eventually replace the old path, which has a separate function for model compilation and dispatch compilation. The new compilation flow is now simpler:

  1. Populate each CandidateTracker with the input and output filepaths. The input filepaths can be overridden by an optional function argument to the compile() function. This argument can be used for model tuning, passing the model filepath as the new input file.
  2. For each candidate, strip the compilation info using iree-opt, and compile to a vmfb with the iree compiler python bindings. Set the candidate's TD spec file (generated during candidate generation), and add any additional iree-compile flags that came from the TuningClient. The extra flags are taken from a new abstract TuningClient function called get_iree_compile_flags.
  3. For all successful compilations, save the vmfbs to the designated output path, and skip any failed compilation. For any failed compilation, a failure dump is saved instead of the vmfb.
  4. Remove duplicate vmfbs, and return the ids of all unique candidates.

@Max191
Copy link
Contributor Author

Max191 commented Dec 16, 2024

This PR is based on #606. Please only review the last commit.

@Max191 Max191 requested review from kuhar and bangtianliu December 16, 2024 18:08
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