-
Couldn't load subscription status.
- Fork 55
Report import failure error code #715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: ovep-develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,82 @@ | ||||||||||
| // Copyright (C) Intel Corporation | ||||||||||
| // Licensed under the MIT License | ||||||||||
|
|
||||||||||
| #pragma once | ||||||||||
|
|
||||||||||
| #include <exception> | ||||||||||
| #include <regex> | ||||||||||
| #include <string> | ||||||||||
|
|
||||||||||
| #include "core/common/status.h" | ||||||||||
|
|
||||||||||
| namespace onnxruntime { | ||||||||||
| namespace openvino_ep { | ||||||||||
|
|
||||||||||
| struct ovep_exception : public std::exception { | ||||||||||
| enum class type { | ||||||||||
| compile_model, | ||||||||||
| import_model, | ||||||||||
| query_prop, | ||||||||||
| read_model, | ||||||||||
| unknown, | ||||||||||
| }; | ||||||||||
|
|
||||||||||
| ovep_exception(const std::string& message, | ||||||||||
| enum class type type) : message_{message}, | ||||||||||
| type_{type}, | ||||||||||
| error_code_{ze_result_code_from_string(message)}, | ||||||||||
| error_name_{ze_result_name_from_string(message)} {} | ||||||||||
|
|
||||||||||
| const char* what() const noexcept override { | ||||||||||
| return message_.data(); | ||||||||||
| } | ||||||||||
|
|
||||||||||
| uint32_t get_code() const { return error_code_; } | ||||||||||
MayureshV1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
|
|
||||||||||
| operator common::Status() const { | ||||||||||
| common::StatusCategory category_ort{common::ONNXRUNTIME}; | ||||||||||
|
|
||||||||||
| if (type_ == type::unknown) { | ||||||||||
| return {category_ort, common::FAIL, message_}; | ||||||||||
| } | ||||||||||
|
|
||||||||||
| // Newer drivers | ||||||||||
| if ((type_ == type::import_model) && | ||||||||||
| (error_code_ == 0x7800000f /* ZE_RESULT_ERROR_INVALID_NATIVE_BINARY */)) { | ||||||||||
javier-intel marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
| std::string message{error_name_ + ", code 0x" + std::to_string(error_code_) + "\nModel needs to be recompiled\n"}; | ||||||||||
|
||||||||||
| std::string message{error_name_ + ", code 0x" + std::to_string(error_code_) + "\nModel needs to be recompiled\n"}; | |
| std::ostringstream oss; | |
| oss << error_name_ << ", code 0x" << std::hex << std::nouppercase << error_code_ << "\nModel needs to be recompiled\n"; | |
| std::string message = oss.str(); |
Uh oh!
There was an error while loading. Please reload this page.