Enabled more VitisAI backend compilers (#21411)

### Description
Enabled more VitisAI backend compilers
This commit is contained in:
glen-amd 2024-07-19 08:34:03 -07:00 committed by GitHub
parent 9140d9b1ff
commit cc4049af83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View file

@ -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.
if (!fs::exists(ep_ctx_fs_path) || !fs::is_regular_file(ep_ctx_fs_path)) {
ORT_THROW("File for EP context cache is missing");
}

View file

@ -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";

View file

@ -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_);
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,