Skip to content
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

Enabled more VitisAI backend compilers #21411

Merged
merged 1 commit into from
Jul 19, 2024
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
2 changes: 1 addition & 1 deletion onnxruntime/core/providers/vitisai/imp/ep_context_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@
fs::path ep_ctx_fs_path(ep_ctx_model_loc);
// Attr "ep_cache_context" stores a relative path.
ep_ctx_fs_path.replace_filename(fs::path(ep_ctx_cache));
// TODO: Validaion of the file location to make sure security is met.
// TODO: Validation of the file location to make sure security is met.

Check warning on line 469 in onnxruntime/core/providers/vitisai/imp/ep_context_utils.cc

View workflow job for this annotation

GitHub Actions / Lint C++

[cpplint] reported by reviewdog 🐶 Missing username in TODO; it should look like "// TODO(my_username): Stuff." [readability/todo] [2] Raw Output: onnxruntime/core/providers/vitisai/imp/ep_context_utils.cc:469: Missing username in TODO; it should look like "// TODO(my_username): Stuff." [readability/todo] [2]
if (!fs::exists(ep_ctx_fs_path) || !fs::is_regular_file(ep_ctx_fs_path)) {
ORT_THROW("File for EP context cache is missing");
}
Expand Down
4 changes: 2 additions & 2 deletions onnxruntime/core/providers/vitisai/include/ep_context_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ namespace fs = std::filesystem;
namespace onnxruntime {

constexpr const uint8_t kXCCode = 1;
constexpr const uint8_t kDDCode = 2;
constexpr const uint8_t kVCode = 4;
[[maybe_unused]] constexpr const uint8_t kDDCode = 2;
[[maybe_unused]] constexpr const uint8_t kVCode = 4;

static constexpr const char* kEPContextOp = "EPContext";
static constexpr const char* kMainContextAttr = "main_context";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
model_path_str_ = ToPathString(GetTopLevelModelPath(graph_viewer).string());
}
std::string backend_cache_dir, backend_cache_key;
get_backend_compilation_cache(model_path_str_, graph_viewer, info_, kXCCode, backend_cache_dir, backend_cache_key, backend_cache_data_);
get_backend_compilation_cache(model_path_str_, graph_viewer, info_, kXCCode | kDDCode | kVCode, backend_cache_dir, backend_cache_key, backend_cache_data_);

Check warning on line 89 in onnxruntime/core/providers/vitisai/vitisai_execution_provider.cc

View workflow job for this annotation

GitHub Actions / Lint C++

[cpplint] reported by reviewdog 🐶 Lines should be <= 120 characters long [whitespace/line_length] [2] Raw Output: onnxruntime/core/providers/vitisai/vitisai_execution_provider.cc:89: Lines should be <= 120 characters long [whitespace/line_length] [2]
info_["cacheDir"] = backend_cache_dir;
info_["cacheKey"] = backend_cache_key;
// Create a new model, reusing the graph name, the op-domain-to-opset-version map,
Expand Down
Loading