Skip to content

Commit

Permalink
Fix for C4267 warning (#23610)
Browse files Browse the repository at this point in the history
### Description
A recent
[commit](1fce51b)
is causing an OVEP warning in
[openvino_provider_factory.cc](https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/core/providers/openvino/openvino_provider_factory.cc#L151).
This PR fixes the warning.

### Motivation and Context
Minor fix
  • Loading branch information
javier-intel authored and ashrit-ms committed Feb 11, 2025
1 parent 7f06469 commit cde5d75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ std::string ParsePrecision(const ProviderOptions& provider_options, std::string&
<< "Update the 'device_type' to specified types 'CPU', 'GPU', 'GPU.0', "
<< "'GPU.1', 'NPU' or from"
<< " HETERO/MULTI/AUTO options and set 'precision' separately. \n";
int delimit = device_type.find("_");
auto delimit = device_type.find("_");
device_type = device_type.substr(0, delimit);
return device_type.substr(delimit + 1);
}
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/core/providers/openvino/ov_interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ void OVInferRequest::SetTensor(const std::string& name, OVTensorPtr& blob) {
}

uint32_t OVInferRequest::GetNumInputs() {
return ovInfReq.get_compiled_model().inputs().size();
return static_cast<uint32_t>(ovInfReq.get_compiled_model().inputs().size());
}

void OVInferRequest::StartAsync() {
Expand Down

0 comments on commit cde5d75

Please sign in to comment.