#[repr(u32)]pub enum SessionMode {
Show 16 variants
Debug = 0,
Release = 1,
InputInside = 2,
InputUser = 3,
OutputInside = 4,
OutputUser = 5,
ResizeDirect = 6,
ResizeDefer = 7,
BackendFix = 8,
BackendAuto = 9,
MemoryCollect = 10,
MemoryCache = 11,
CodegenDisable = 12,
CodegenEnable = 13,
ResizeCheck = 14,
ResizeFix = 15,
}
Expand description
The session mode to be used The items are mostly untested and are only documented 1:1 to the C++ codebase The only two items tested are
Debug
Release
Variants§
Debug = 0
About CallBack, Default Session_Debug*/ /** runSessionWithCallBack is allowed and can get internal op info
Release = 1
runSessionWithCallBack is not valid and can’t get any info of op in session
InputInside = 2
About input tensor, Default Session_Input_Inside*/ /** The input tensor is alloced by session, input data after session resized
InputUser = 3
The input tensor is alloced by user, set input data before session resize
OutputInside = 4
The output tensor depends on session, and can’t be separate used
OutputUser = 5
The output tensor can be separated from session
ResizeDirect = 6
Try Resize Session when create Session or not, default direct:
ResizeDefer = 7
Try Resize Session when create Session or not, default direct:
BackendFix = 8
Determine the Execution’s forward type is determine by user or auto determine
BackendAuto = 9
Determine the Execution’s forward type is determine by user or auto determine
MemoryCollect = 10
Determine static memory whether recyle in resizeSession or just cache the memory
MemoryCache = 11
Determine static memory whether recyle in resizeSession or just cache the memory
CodegenDisable = 12
Determine whether use codegen function
CodegenEnable = 13
Determine whether use codegen function
ResizeCheck = 14
Dynamic Reisze Optimization
ResizeFix = 15
Dynamic Reisze Optimization
Trait Implementations§
Source§impl Clone for SessionMode
impl Clone for SessionMode
Source§fn clone(&self) -> SessionMode
fn clone(&self) -> SessionMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more