Skip to content

Commit bf3e495

Browse files
committed
Formatting and other minor changes
1 parent 64df737 commit bf3e495

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

onnxruntime/core/providers/openvino/exceptions.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ struct ovep_exception : public std::exception {
2626
type_{type},
2727
error_code_{ze_result_code_from_string(message)},
2828
error_name_{ze_result_name_from_string(message)} {}
29-
//ovep_exception(const std::exception& ex) : message_{ex.what()} {}
3029

3130
const char* what() const noexcept override {
3231
return message_.data();
@@ -59,24 +58,22 @@ struct ovep_exception : public std::exception {
5958
std::string error_name_;
6059

6160
private:
62-
uint32_t ze_result_code_from_string(const std::string &ov_exception_string) {
61+
uint32_t ze_result_code_from_string(const std::string& ov_exception_string) {
6362
uint32_t error_code{0};
6463
std::regex error_code_pattern("code 0x([0-9a-fA-F]+)");
6564
std::smatch matches;
6665
if (std::regex_search(ov_exception_string, matches, error_code_pattern)) {
6766
std::from_chars(&(*matches[1].first), &(*matches[1].second), error_code, 16);
6867
}
69-
// std::string message{error_message + ", code 0x" + std::to_string(error_code) + "\nModel needs to be recompiled\n"};
7068
return error_code;
7169
}
72-
std::string ze_result_name_from_string(const std::string &ov_exception_string) {
70+
std::string ze_result_name_from_string(const std::string& ov_exception_string) {
7371
std::string error_message = "UNKNOWN NPU ERROR";
7472
std::regex error_message_pattern(R"(\bZE_\w*\b)");
7573
std::smatch matches;
7674
if (std::regex_search(ov_exception_string, matches, error_message_pattern)) {
7775
error_message = matches[0];
7876
}
79-
// std::string message{error_message + ", code 0x" + std::to_string(error_code) + "\nModel needs to be recompiled\n"};
8077
return error_message;
8178
}
8279
};

onnxruntime/core/providers/openvino/ov_versions/capability.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ GetCapability::GetCapability(const EPCtxHandler& ep_ctx_handler,
3838
device_type_ = "CPU";
3939
if (enable_qdq_optimizer) npu_qdq_optimizer_enabled = true;
4040
} else if (enable_qdq_optimizer && device_type_.find("GPU") != std::string::npos) {
41-
npu_qdq_optimizer_enabled = true; // see data_ops.cc ~615 where we check for int16 types for gpu, this may change to a better approach later
41+
npu_qdq_optimizer_enabled = true; // see data_ops.cc ~615 where we check for int16 types for gpu, this may change to a better approach later
4242
}
4343

4444
#if OPENVINO_VERSION_MAJOR == 2024 && OPENVINO_VERSION_MINOR == 5

onnxruntime/core/providers/openvino/ov_versions/data_ops.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ bool DataOps::type_is_supported(const NodeArg* node_arg, bool is_initializer) {
614614
}
615615
// experimentally for GPU and qdq stripping mode allow int16 types
616616
if (npu_qdq_optimizer_enabled_ && (dtype == ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_INT16 || dtype == ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_UINT16))
617-
return true;
617+
return true;
618618
}
619619
#ifndef NDEBUG
620620
if (openvino_ep::backend_utils::IsDebugEnabled()) {

0 commit comments

Comments
 (0)