mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-29 20:14:01 +00:00
Enabled more VitisAI backend compilers (#21411)
### Description Enabled more VitisAI backend compilers
This commit is contained in:
parent
9140d9b1ff
commit
cc4049af83
3 changed files with 4 additions and 4 deletions
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue