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

[MIGraphX EP] Add migraphx ep save load compiles (#20643) #42

Merged

Conversation

TedThemistokleous
Copy link

Adds the ability for MIGraphX EP to save off or load compiled models to save time between inferences.

Via Command line

User should be able to set the save ability with
ORT_MIGRAPHX_SAVE_COMPILED_MODEL
ORT_MIGRAPHX_SAVE_COMPILE_PATH

User should be able to set the load ability with
ORT_MIGRAPHX_LOAD_COMPILED_MODEL
ORT_MIGRAPHX_LOAD_COMPILE_PATH

via Onnxruntime API

migx_save_compiled_model
migx_save_model_name
migx_load_compiled_model
migx_load_model_name

The motivation for this is to leverage MIGraphX's existing API to save/load models after our compile step of graph optimization. For larger models or models which were compiled with additional tuning steps, this saves time after first compile and inference run, and thus speeds up the user experience in order to encourage development.


Description

Allow save load between model runs. Save files as migraphx mxr

Motivation and Context

Adds the ability for MIGraphX EP to save off or load compiled models to
save time between inferences.

Via Command line

User should be able to set the save ability with
ORT_MIGRAPHX_SAVE_COMPILED_MODEL
ORT_MIGRAPHX_SAVE_COMPILE_PATH

User should be able to set the load ability with
ORT_MIGRAPHX_LOAD_COMPILED_MODEL
ORT_MIGRAPHX_LOAD_COMPILE_PATH

via Onnxruntime API

migx_save_compiled_model
migx_save_model_name
migx_load_compiled_model
migx_load_model_name

The motivation for this is to leverage MIGraphX's existing API to
save/load models after our compile step of graph optimization. For
larger models or models which were compiled with additional tuning
steps, this saves time after first compile and inference run, and thus
speeds up the user experience in order to encourage development.

---------

Co-authored-by: Ted Themistokleous <[email protected]>
@TedThemistokleous TedThemistokleous force-pushed the model_save_load_6.2_backport branch from a943e56 to fbee484 Compare June 17, 2024 23:31
@TedThemistokleous TedThemistokleous self-assigned this Jun 17, 2024
@TedThemistokleous
Copy link
Author

TedThemistokleous commented Jun 17, 2024

This is already up streamed.- Adding this back so our latest releases/builds will test all features + the windows changes as well

@TedThemistokleous TedThemistokleous added the enhancement New feature or request label Jun 18, 2024
@TedThemistokleous TedThemistokleous merged commit 2e20edc into rocm6.2_internal_testing Jun 21, 2024
12 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant