Adding migraphx compile options support - #103
Open
pnikolic-amd wants to merge 7 commits into
Open
Conversation
|
|
tperry-amd
requested changes
Aug 26, 2026
tperry-amd
requested changes
Aug 26, 2026
tperry-amd
requested changes
Aug 28, 2026
| std::string lower{value}; | ||
| std::transform(lower.begin(), lower.end(), lower.begin(), | ||
| [](const unsigned char c) { return static_cast<char>(std::tolower(c)); }); | ||
| if (lower == "eager") { |
Collaborator
There was a problem hiding this comment.
The better way to do this is to have a const lookup table (probably at the top of the file) that maps the string to compute mode. Then this logic would just loop through the mapping table. This will make it easier to maintain in the future.
Collaborator
Author
There was a problem hiding this comment.
Added lookup table to replace if logics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Trades compile time against optimization.
eager = fast compile time, slower inference time;
balanced = normal compile time, faster inference time;
This option can be used when migrahpx EP is used, it has no effect with different EP. When used EP sets one of these three modes into migraphx compile mode, if not set it uses default mode in migraphx which is balanced. "balanced" mode is default compilation process in migraphx. "maximum" mode is equivalent of setting --exaustive-tuning flag when compiling with migraphx. "eager" mode removes parts of optimization and kernel benchmarking to achieve better compilatin time at the cost of optimization.