File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
onnxruntime/core/providers/openvino Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ common::Status OpenVINOExecutionProvider::Compile(
114114 }
115115
116116 // Metadata is always read from model location, this could be a source or epctx model
117- fs::path metadata_filename = context_model_file_path.filename (). stem ().string () + " _metadata.bin" ;
117+ fs::path metadata_filename = context_model_file_path.stem ().string () + " _metadata.bin" ;
118118 fs::path metadata_file_path = context_model_file_path.parent_path () / metadata_filename;
119119 std::ifstream file (metadata_file_path, std::ios::binary);
120120 ORT_RETURN_IF_NOT (file, " Metadata file was not found: " + metadata_file_path.string ());
@@ -202,9 +202,9 @@ common::Status OpenVINOExecutionProvider::Compile(
202202 // If saving metadata then save it to the provided path or ose the original model path
203203 // Multiple calls to Compile() will update the metadata and for the last call
204204 // the resulting file will contain the aggregated content
205- if ( std::ofstream file{metadata_file_path, std::ios::binary}) {
206- file << metadata ;
207- }
205+ std::ofstream file{metadata_file_path, std::ios::binary};
206+ ORT_RETURN_IF_NOT (file, " Metadata file could not be written: " , metadata_file_path) ;
207+ file << metadata;
208208 }
209209
210210 return status;
You can’t perform that action at this time.
0 commit comments