OnnxRuntime
Ort::SessionOptions Struct Reference

Options object used when creating a new Session object. More...

#include <onnxruntime_cxx_api.h>

Inherits Ort::Base< OrtSessionOptions >.

Public Member Functions

 SessionOptions (std::nullptr_t)
 Create an empty SessionOptions object, must be assigned a valid one to be used. More...
 
 SessionOptions ()
 Wraps OrtApi::CreateSessionOptions. More...
 
 SessionOptions (OrtSessionOptions *p)
 Used for interop with the C API. More...
 
SessionOptions Clone () const
 Creates and returns a copy of this SessionOptions object. Wraps OrtApi::CloneSessionOptions. More...
 
SessionOptionsSetIntraOpNumThreads (int intra_op_num_threads)
 Wraps OrtApi::SetIntraOpNumThreads. More...
 
SessionOptionsSetInterOpNumThreads (int inter_op_num_threads)
 Wraps OrtApi::SetInterOpNumThreads. More...
 
SessionOptionsSetGraphOptimizationLevel (GraphOptimizationLevel graph_optimization_level)
 Wraps OrtApi::SetSessionGraphOptimizationLevel. More...
 
SessionOptionsEnableCpuMemArena ()
 Wraps OrtApi::EnableCpuMemArena. More...
 
SessionOptionsDisableCpuMemArena ()
 Wraps OrtApi::DisableCpuMemArena. More...
 
SessionOptionsSetOptimizedModelFilePath (const char *optimized_model_file)
 Wraps OrtApi::SetOptimizedModelFilePath. More...
 
SessionOptionsEnableProfiling (const char *profile_file_prefix)
 Wraps OrtApi::EnableProfiling. More...
 
SessionOptionsDisableProfiling ()
 Wraps OrtApi::DisableProfiling. More...
 
SessionOptionsEnableOrtCustomOps ()
 Wraps OrtApi::EnableOrtCustomOps. More...
 
SessionOptionsEnableMemPattern ()
 Wraps OrtApi::EnableMemPattern. More...
 
SessionOptionsDisableMemPattern ()
 Wraps OrtApi::DisableMemPattern. More...
 
SessionOptionsSetExecutionMode (ExecutionMode execution_mode)
 Wraps OrtApi::SetSessionExecutionMode. More...
 
SessionOptionsSetLogId (const char *logid)
 Wraps OrtApi::SetSessionLogId. More...
 
SessionOptionsSetLogSeverityLevel (int level)
 Wraps OrtApi::SetSessionLogSeverityLevel. More...
 
SessionOptionsAdd (OrtCustomOpDomain *custom_op_domain)
 Wraps OrtApi::AddCustomOpDomain. More...
 
SessionOptionsDisablePerSessionThreads ()
 Wraps OrtApi::DisablePerSessionThreads. More...
 
SessionOptionsAddConfigEntry (const char *config_key, const char *config_value)
 Wraps OrtApi::AddSessionConfigEntry. More...
 
SessionOptionsAddInitializer (const char *name, const OrtValue *ort_val)
 Wraps OrtApi::AddInitializer. More...
 
SessionOptionsAddExternalInitializers (const std::vector< std::string > &names, const std::vector< Value > &ort_values)
 Wraps OrtApi::AddExternalInitializers. More...
 
SessionOptionsAppendExecutionProvider_CUDA (const OrtCUDAProviderOptions &provider_options)
 Wraps OrtApi::SessionOptionsAppendExecutionProvider_CUDA. More...
 
SessionOptionsAppendExecutionProvider_CUDA_V2 (const OrtCUDAProviderOptionsV2 &provider_options)
 Wraps OrtApi::SessionOptionsAppendExecutionProvider_CUDA_V2. More...
 
SessionOptionsAppendExecutionProvider_ROCM (const OrtROCMProviderOptions &provider_options)
 Wraps OrtApi::SessionOptionsAppendExecutionProvider_ROCM. More...
 
SessionOptionsAppendExecutionProvider_OpenVINO (const OrtOpenVINOProviderOptions &provider_options)
 Wraps OrtApi::SessionOptionsAppendExecutionProvider_OpenVINO. More...
 
SessionOptionsAppendExecutionProvider_TensorRT (const OrtTensorRTProviderOptions &provider_options)
 Wraps OrtApi::SessionOptionsAppendExecutionProvider_TensorRT. More...
 
SessionOptionsAppendExecutionProvider_TensorRT_V2 (const OrtTensorRTProviderOptionsV2 &provider_options)
 Wraps OrtApi::SessionOptionsAppendExecutionProvider_TensorRT. More...
 
SessionOptionsAppendExecutionProvider_MIGraphX (const OrtMIGraphXProviderOptions &provider_options)
 
SessionOptionsAppendExecutionProvider (const std::string &provider_name, const std::unordered_map< std::string, std::string > &provider_options={})
 Wraps OrtApi::SessionOptionsAppendExecutionProvider. Currently supports SNPE and XNNPACK. More...
 
SessionOptionsSetCustomCreateThreadFn (OrtCustomCreateThreadFn ort_custom_create_thread_fn)
 Wraps OrtApi::SessionOptionsSetCustomCreateThreadFn. More...
 
SessionOptionsSetCustomThreadCreationOptions (void *ort_custom_thread_creation_options)
 Wraps OrtApi::SessionOptionsSetCustomThreadCreationOptions. More...
 
SessionOptionsSetCustomJoinThreadFn (OrtCustomJoinThreadFn ort_custom_join_thread_fn)
 Wraps OrtApi::SessionOptionsSetCustomJoinThreadFn. More...
 
- Public Member Functions inherited from Ort::Base< OrtSessionOptions >
 Base ()=default
 
 Base (OrtSessionOptions *p)
 
 ~Base ()
 
 operator OrtSessionOptions * ()
 
 operator const OrtSessionOptions * () const
 
OrtSessionOptionsrelease ()
 Releases ownership of the contained pointer. More...
 

Additional Inherited Members

- Public Types inherited from Ort::Base< OrtSessionOptions >
using contained_type = OrtSessionOptions
 
- Protected Member Functions inherited from Ort::Base< OrtSessionOptions >
 Base (const Base &)=delete
 
 Base (Base &&v) noexcept
 
Baseoperator= (const Base &)=delete
 
void operator= (Base &&v) noexcept
 
- Protected Attributes inherited from Ort::Base< OrtSessionOptions >
OrtSessionOptionsp_
 

Detailed Description

Options object used when creating a new Session object.

Wraps OrtSessionOptions object and methods

Constructor & Destructor Documentation

◆ SessionOptions() [1/3]

Ort::SessionOptions::SessionOptions ( std::nullptr_t  )
inlineexplicit

Create an empty SessionOptions object, must be assigned a valid one to be used.

◆ SessionOptions() [2/3]

Ort::SessionOptions::SessionOptions ( )

◆ SessionOptions() [3/3]

Ort::SessionOptions::SessionOptions ( OrtSessionOptions p)
inlineexplicit

Used for interop with the C API.

Member Function Documentation

◆ Add()

SessionOptions & Ort::SessionOptions::Add ( OrtCustomOpDomain custom_op_domain)

◆ AddConfigEntry()

SessionOptions & Ort::SessionOptions::AddConfigEntry ( const char *  config_key,
const char *  config_value 
)

◆ AddExternalInitializers()

SessionOptions & Ort::SessionOptions::AddExternalInitializers ( const std::vector< std::string > &  names,
const std::vector< Value > &  ort_values 
)

◆ AddInitializer()

SessionOptions & Ort::SessionOptions::AddInitializer ( const char *  name,
const OrtValue ort_val 
)

◆ AppendExecutionProvider()

SessionOptions & Ort::SessionOptions::AppendExecutionProvider ( const std::string &  provider_name,
const std::unordered_map< std::string, std::string > &  provider_options = {} 
)

Wraps OrtApi::SessionOptionsAppendExecutionProvider. Currently supports SNPE and XNNPACK.

◆ AppendExecutionProvider_CUDA()

SessionOptions & Ort::SessionOptions::AppendExecutionProvider_CUDA ( const OrtCUDAProviderOptions provider_options)

◆ AppendExecutionProvider_CUDA_V2()

SessionOptions & Ort::SessionOptions::AppendExecutionProvider_CUDA_V2 ( const OrtCUDAProviderOptionsV2 provider_options)

◆ AppendExecutionProvider_MIGraphX()

SessionOptions & Ort::SessionOptions::AppendExecutionProvider_MIGraphX ( const OrtMIGraphXProviderOptions provider_options)

◆ AppendExecutionProvider_OpenVINO()

SessionOptions & Ort::SessionOptions::AppendExecutionProvider_OpenVINO ( const OrtOpenVINOProviderOptions provider_options)

◆ AppendExecutionProvider_ROCM()

SessionOptions & Ort::SessionOptions::AppendExecutionProvider_ROCM ( const OrtROCMProviderOptions provider_options)

◆ AppendExecutionProvider_TensorRT()

SessionOptions & Ort::SessionOptions::AppendExecutionProvider_TensorRT ( const OrtTensorRTProviderOptions provider_options)

◆ AppendExecutionProvider_TensorRT_V2()

SessionOptions & Ort::SessionOptions::AppendExecutionProvider_TensorRT_V2 ( const OrtTensorRTProviderOptionsV2 provider_options)

◆ Clone()

SessionOptions Ort::SessionOptions::Clone ( ) const

Creates and returns a copy of this SessionOptions object. Wraps OrtApi::CloneSessionOptions.

◆ DisableCpuMemArena()

SessionOptions & Ort::SessionOptions::DisableCpuMemArena ( )

◆ DisableMemPattern()

SessionOptions & Ort::SessionOptions::DisableMemPattern ( )

◆ DisablePerSessionThreads()

SessionOptions & Ort::SessionOptions::DisablePerSessionThreads ( )

◆ DisableProfiling()

SessionOptions & Ort::SessionOptions::DisableProfiling ( )

◆ EnableCpuMemArena()

SessionOptions & Ort::SessionOptions::EnableCpuMemArena ( )

◆ EnableMemPattern()

SessionOptions & Ort::SessionOptions::EnableMemPattern ( )

◆ EnableOrtCustomOps()

SessionOptions & Ort::SessionOptions::EnableOrtCustomOps ( )

◆ EnableProfiling()

SessionOptions & Ort::SessionOptions::EnableProfiling ( const char *  profile_file_prefix)

◆ SetCustomCreateThreadFn()

SessionOptions & Ort::SessionOptions::SetCustomCreateThreadFn ( OrtCustomCreateThreadFn  ort_custom_create_thread_fn)

◆ SetCustomJoinThreadFn()

SessionOptions & Ort::SessionOptions::SetCustomJoinThreadFn ( OrtCustomJoinThreadFn  ort_custom_join_thread_fn)

◆ SetCustomThreadCreationOptions()

SessionOptions & Ort::SessionOptions::SetCustomThreadCreationOptions ( void *  ort_custom_thread_creation_options)

◆ SetExecutionMode()

SessionOptions & Ort::SessionOptions::SetExecutionMode ( ExecutionMode  execution_mode)

◆ SetGraphOptimizationLevel()

SessionOptions & Ort::SessionOptions::SetGraphOptimizationLevel ( GraphOptimizationLevel  graph_optimization_level)

◆ SetInterOpNumThreads()

SessionOptions & Ort::SessionOptions::SetInterOpNumThreads ( int  inter_op_num_threads)

◆ SetIntraOpNumThreads()

SessionOptions & Ort::SessionOptions::SetIntraOpNumThreads ( int  intra_op_num_threads)

◆ SetLogId()

SessionOptions & Ort::SessionOptions::SetLogId ( const char *  logid)

◆ SetLogSeverityLevel()

SessionOptions & Ort::SessionOptions::SetLogSeverityLevel ( int  level)

◆ SetOptimizedModelFilePath()

SessionOptions & Ort::SessionOptions::SetOptimizedModelFilePath ( const char *  optimized_model_file)