[Backend] support ort offline graph optimize option (#2268)

* support ort offline graph optimize option

* support ort offline graph optimize option
This commit is contained in:
DefTruth
2023-11-02 09:19:33 +08:00
committed by GitHub
parent d910d6116c
commit 6a8cd4d759
4 changed files with 15 additions and 8 deletions

View File

@@ -46,6 +46,9 @@ bool OrtBackend::BuildOption(const OrtBackendOption& option) {
if (option.execution_mode >= 0) {
session_options_.SetExecutionMode(ExecutionMode(option.execution_mode));
}
if (!option.optimized_model_filepath.empty()) {
session_options_.SetOptimizedModelFilePath(option.optimized_model_filepath.c_str());
}
#ifdef WITH_DIRECTML
// If use DirectML