mirror of
https://github.com/pykeio/ort
synced 2026-04-25 16:34:55 +02:00
fix: separate graph optimization level 3
This commit is contained in:
@@ -345,6 +345,7 @@ pub enum GraphOptimizationLevel {
|
||||
ORT_DISABLE_ALL = 0,
|
||||
ORT_ENABLE_BASIC = 1,
|
||||
ORT_ENABLE_EXTENDED = 2,
|
||||
ORT_ENABLE_LAYOUT = 3,
|
||||
ORT_ENABLE_ALL = 99
|
||||
}
|
||||
#[repr(i32)]
|
||||
|
||||
@@ -370,7 +370,9 @@ pub enum GraphOptimizationLevel {
|
||||
Level2,
|
||||
/// Level 3 optimizations include memory layout optimizations, which may optimize the graph to use the NCHWc memory
|
||||
/// layout rather than NCHW to improve spatial locality for some targets.
|
||||
Level3
|
||||
Level3,
|
||||
/// Enable all optimizations.
|
||||
All
|
||||
}
|
||||
|
||||
impl From<GraphOptimizationLevel> for ort_sys::GraphOptimizationLevel {
|
||||
@@ -379,7 +381,8 @@ impl From<GraphOptimizationLevel> for ort_sys::GraphOptimizationLevel {
|
||||
GraphOptimizationLevel::Disable => ort_sys::GraphOptimizationLevel::ORT_DISABLE_ALL,
|
||||
GraphOptimizationLevel::Level1 => ort_sys::GraphOptimizationLevel::ORT_ENABLE_BASIC,
|
||||
GraphOptimizationLevel::Level2 => ort_sys::GraphOptimizationLevel::ORT_ENABLE_EXTENDED,
|
||||
GraphOptimizationLevel::Level3 => ort_sys::GraphOptimizationLevel::ORT_ENABLE_ALL
|
||||
GraphOptimizationLevel::Level3 => ort_sys::GraphOptimizationLevel::ORT_ENABLE_LAYOUT,
|
||||
GraphOptimizationLevel::All => ort_sys::GraphOptimizationLevel::ORT_ENABLE_ALL
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user