Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ std::string ParseDeviceType(std::shared_ptr<OVCore> ov_core, const ProviderOptio
if (!device_mode.empty()) {
selected_device = device_mode + ":" + ov_luid_devices;
for (const auto& dev_str : devices_to_check) {
const auto default_dev = split(dev_str, '.')[0];
const std::string default_dev = split(dev_str, '.')[0];

if (ov_luid_devices.find(default_dev) == std::string::npos)
selected_device = selected_device + "," + dev_str;
Expand Down Expand Up @@ -532,7 +532,7 @@ struct OpenVINO_Provider : Provider {
std::string ov_device_string;
if (is_meta_device_factory) {
// Build up a meta device string based on the devices that are passed in. E.g. AUTO:NPU,GPU.0,CPU
ov_device_string = ov_meta_device_type;
ov_device_string = std::move(ov_meta_device_type);
ov_device_string += ":";
}

Expand All @@ -545,7 +545,7 @@ struct OpenVINO_Provider : Provider {
prepend_comma = true;
}

provider_options["device_type"] = ov_device_string;
provider_options["device_type"] = std::move(ov_device_string);

// Parse provider info with the device type
ProviderInfo pi;
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/core/providers/openvino/ov_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ OrtStatus* OpenVINOEpPluginFactory::GetSupportedDevices(const OrtHardwareDevice*
std::string ov_device_name;
auto get_gpu_device_id = [&](const std::string& ov_device) {
try {
auto device_id_str = ov_core_->get_property(ov_device, "GPU_DEVICE_ID").as<std::string>();
const std::string device_id_str = ov_core_->get_property(ov_device, "GPU_DEVICE_ID").as<std::string>();
return static_cast<uint32_t>(std::stoul(device_id_str, nullptr, 0));
} catch (ov::Exception&) {
return 0u; // If we can't get the GPU_DEVICE_ID info, we won't have a device ID.
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/core/providers/openvino/ov_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class OVInferRequest {
cached_binding.tensor_ptr.reset();
auto ov_tensor = std::make_shared<ov::Tensor>(type, shape, const_cast<void*>(ort_ptr));
ovInfReq.set_tensor(name, *ov_tensor);
cached_binding = {ov_tensor, ort_ptr};
cached_binding = {std::move(ov_tensor), ort_ptr};
}
}

Expand Down
Loading