diff --git a/include/onnxruntime/core/session/onnxruntime_c_api.h b/include/onnxruntime/core/session/onnxruntime_c_api.h index fd271a5306324..4ca2791e26ab9 100644 --- a/include/onnxruntime/core/session/onnxruntime_c_api.h +++ b/include/onnxruntime/core/session/onnxruntime_c_api.h @@ -621,7 +621,7 @@ typedef struct OrtMIGraphXProviderOptions { const char* migraphx_save_model_path; // migraphx model path name int migraphx_load_compiled_model; // migraphx int8 cal table. Default 0 = false, noznero = true const char* migraphx_load_model_path; // migraphx model path name - int migraphx_exhaustive_tune; // migraphx tuned compile Default 0 = false, nonzero = true + bool migraphx_exhaustive_tune; // migraphx tuned compile Default = false } OrtMIGraphXProviderOptions; /** \brief OpenVINO Provider Options diff --git a/onnxruntime/core/providers/migraphx/migraphx_execution_provider.cc b/onnxruntime/core/providers/migraphx/migraphx_execution_provider.cc index 63294e4c2fb17..b2a339964f3a9 100644 --- a/onnxruntime/core/providers/migraphx/migraphx_execution_provider.cc +++ b/onnxruntime/core/providers/migraphx/migraphx_execution_provider.cc @@ -1200,10 +1200,7 @@ Status MIGraphXExecutionProvider::Compile(const std::vector& migraphx::compile_options co; co.set_fast_math(false); - co.set_exhaustive_tune_flag(false); - if (exhaustive_tune_) { - co.set_exhaustive_tune_flag(true); - } + co.set_exhaustive_tune_flag(exhaustive_tune_); LOGS_DEFAULT(INFO) << "Model Compile: Begin" << std::endl; prog.compile(t_, co); LOGS_DEFAULT(INFO) << "Model Compile: Complete" << std::endl; @@ -1364,10 +1361,7 @@ Status MIGraphXExecutionProvider::Compile(const std::vector& LOGS_DEFAULT(INFO) << "Model Compile: Begin" << std::endl; migraphx::compile_options co; co.set_fast_math(false); - co.set_exhaustive_tune_flag(false); - if (exhaustive_tune_) { - co.set_exhaustive_tune_flag(true); - } + co.set_exhaustive_tune_flag(exhaustive_tune_); prog.compile(t, co); save_compiled_model(prog, mgx_state->save_compiled_mode, mgx_state->save_compiled_path); diff --git a/onnxruntime/core/providers/migraphx/migraphx_execution_provider_info.cc b/onnxruntime/core/providers/migraphx/migraphx_execution_provider_info.cc index 32f6893e9fa7e..1f9a47d3ad87d 100644 --- a/onnxruntime/core/providers/migraphx/migraphx_execution_provider_info.cc +++ b/onnxruntime/core/providers/migraphx/migraphx_execution_provider_info.cc @@ -59,7 +59,7 @@ ProviderOptions MIGraphXExecutionProviderInfo::ToProviderOptions(const MIGraphXE {migraphx::provider_option_names::kInt8Enable, MakeStringWithClassicLocale(info.int8_enable)}, {migraphx::provider_option_names::kSaveCompiledModel, MakeStringWithClassicLocale(info.save_compiled_model)}, {migraphx::provider_option_names::kLoadCompiledModel, MakeStringWithClassicLocale(info.load_compiled_model)}, - {migraphx::provider_option_names::kInt8Enable, MakeStringWithClassicLocale(info.exhaustive_tune)}, + {migraphx::provider_option_names::kExhaustiveTune, MakeStringWithClassicLocale(info.exhaustive_tune)}, }; return options; } @@ -71,7 +71,7 @@ ProviderOptions MIGraphXExecutionProviderInfo::ToProviderOptions(const OrtMIGrap {migraphx::provider_option_names::kInt8Enable, MakeStringWithClassicLocale(info.migraphx_int8_enable)}, {migraphx::provider_option_names::kSaveCompiledModel, MakeStringWithClassicLocale(info.migraphx_save_compiled_model)}, {migraphx::provider_option_names::kLoadCompiledModel, MakeStringWithClassicLocale(info.migraphx_load_compiled_model)}, - {migraphx::provider_option_names::kInt8Enable, MakeStringWithClassicLocale(info.migraphx_exhaustive_tune)}, + {migraphx::provider_option_names::kExhaustiveTune, MakeStringWithClassicLocale(info.migraphx_exhaustive_tune)}, }; return options; }