Skip to content

Commit

Permalink
Handle case with missing parent path so we use current path
Browse files Browse the repository at this point in the history
  • Loading branch information
Ted Themistokleous committed Aug 2, 2024
1 parent 54362d7 commit c31472d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1299,7 +1299,7 @@ Status MIGraphXExecutionProvider::Compile(const std::vector<FusedNodeAndGraph>&
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;
cmp_options.set_external_data_path(model_path_.parent_path().string());
cmp_options.set_external_data_path(model_path_.has_parent_path() ? model_path_.parent_path().string() : std::filesystem::current_path().string());

Check warning on line 1302 in onnxruntime/core/providers/migraphx/migraphx_execution_provider.cc

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Lines should be <= 120 characters long [whitespace/line_length] [2] Raw Output: onnxruntime/core/providers/migraphx/migraphx_execution_provider.cc:1302: Lines should be <= 120 characters long [whitespace/line_length] [2]
prog = migraphx::parse_onnx_buffer(onnx_string, cmp_options);

// Read in the calibration data and map it to an migraphx paramater map for the calibration ops
Expand Down

0 comments on commit c31472d

Please sign in to comment.