Skip to content

Commit

Permalink
Enabled more backend compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
glen-amd committed Jul 18, 2024
1 parent 9140d9b commit 7590a4c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
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 @@ std::string RetrieveEPContextCache(
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 @@ void VitisAIExecutionProvider::PrepareEPContextEnablement(
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

0 comments on commit 7590a4c

Please sign in to comment.