Fix input shape related compile logs for MIGraphX EP to be semantically correct (#22624)

As the title suggests, recompilation is done if a mismatch is detected.
Changed the logs to reflect that behavior.
This commit is contained in:
sstamenk 2024-10-30 19:46:35 -07:00 committed by GitHub
parent 60bfa7fab1
commit a2070bf091
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1152,7 +1152,7 @@ Status MIGraphXExecutionProvider::Compile(const std::vector<FusedNodeAndGraph>&
if (!no_input_shape) {
if (!load_precompiled_model(prog, load_compiled_model_, std::string{load_compiled_path_})) {
LOGS_DEFAULT(INFO) << "No Input shapes detected quantizing model";
LOGS_DEFAULT(INFO) << "No input shapes detected quantizing model";
prog = migraphx::parse_onnx_buffer(onnx_string_buffer, options);
// Read in the calibration data and map it to an migraphx paramater map for the calibration ops
@ -1293,7 +1293,7 @@ Status MIGraphXExecutionProvider::Compile(const std::vector<FusedNodeAndGraph>&
// re-compile the program
if (!input_shape_match) {
if (!load_precompiled_model(prog, load_compiled_model_, std::string{load_compiled_path_})) {
LOGS_DEFAULT(VERBOSE) << "No Input shapes mismatch detected. Recompiling" << std::endl;
LOGS_DEFAULT(VERBOSE) << "Input shape mismatch detected. Recompiling" << std::endl;
#ifndef ENABLE_TRAINING_CORE
#if HIP_VERSION_MAJOR > 6 || (HIP_VERSION_MAJOR == 6 && HIP_VERSION_MINOR >= 2)
cmp_options.set_external_data_path(model_path_.has_parent_path() ? model_path_.parent_path().string() : std::filesystem::current_path().string());