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 7442baf commit 283de9d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,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 1310 in onnxruntime/core/providers/migraphx/migraphx_execution_provider.cc

View workflow job for this annotation

GitHub Actions / cpplint

[cpplint] onnxruntime/core/providers/migraphx/migraphx_execution_provider.cc#L1310

Lines should be <= 120 characters long [whitespace/line_length] [2]
Raw output
onnxruntime/core/providers/migraphx/migraphx_execution_provider.cc:1310:  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 283de9d

Please sign in to comment.