Skip to content

Adding migraphx compile options support - #103

Open
pnikolic-amd wants to merge 7 commits into
mainfrom
compile-options-support
Open

Adding migraphx compile options support#103
pnikolic-amd wants to merge 7 commits into
mainfrom
compile-options-support

Conversation

@pnikolic-amd

@pnikolic-amd pnikolic-amd commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

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.

@pnikolic-amd pnikolic-amd self-assigned this Aug 25, 2026
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Comment thread src/shared/CMakeLists.txt Outdated
Comment thread src/migraphx/mgx_info.cc Outdated
Comment thread src/migraphx/mgx_info.cc Outdated
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") {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added lookup table to replace if logics

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.

3 participants