# OnnxRuntime: Ort::SessionOptions Struct Reference

Loading...
Searching...
No Matches
Ort::SessionOptions Struct Reference

Wrapper around OrtSessionOptions. More...

`#include <onnxruntime_cxx_api.h>`

Inheritance diagram for Ort::SessionOptions:

## Public Member Functions

| SessionOptions (std::nullptr_t)
| Create an empty SessionOptions object, must be assigned a valid one to be used.
| SessionOptions ()
| Wraps OrtApi::CreateSessionOptions.
| SessionOptions (OrtSessionOptions *p)
| Used for interop with the C API.
UnownedSessionOptions | GetUnowned () const
ConstSessionOptions | GetConst () const
Public Member Functions inherited from Ort::detail::SessionOptionsImpl< OrtSessionOptions >
SessionOptionsImpl & | SetIntraOpNumThreads (int intra_op_num_threads)
| Wraps OrtApi::SetIntraOpNumThreads.
SessionOptionsImpl & | SetInterOpNumThreads (int inter_op_num_threads)
| Wraps OrtApi::SetInterOpNumThreads.
SessionOptionsImpl & | SetGraphOptimizationLevel (GraphOptimizationLevel graph_optimization_level)
| Wraps OrtApi::SetSessionGraphOptimizationLevel.
SessionOptionsImpl & | EnableCpuMemArena ()
| Wraps OrtApi::EnableCpuMemArena.
SessionOptionsImpl & | DisableCpuMemArena ()
| Wraps OrtApi::DisableCpuMemArena.
SessionOptionsImpl & | SetOptimizedModelFilePath (const char *optimized_model_file)
| Wraps OrtApi::SetOptimizedModelFilePath.
SessionOptionsImpl & | EnableProfiling (const char *profile_file_prefix)
| Wraps OrtApi::EnableProfiling.
SessionOptionsImpl & | DisableProfiling ()
| Wraps OrtApi::DisableProfiling.
SessionOptionsImpl & | EnableOrtCustomOps ()
| Wraps OrtApi::EnableOrtCustomOps.
SessionOptionsImpl & | EnableMemPattern ()
| Wraps OrtApi::EnableMemPattern.
SessionOptionsImpl & | DisableMemPattern ()
| Wraps OrtApi::DisableMemPattern.
SessionOptionsImpl & | SetExecutionMode (ExecutionMode execution_mode)
| Wraps OrtApi::SetSessionExecutionMode.
SessionOptionsImpl & | SetLogId (const char *logid)
| Wraps OrtApi::SetSessionLogId.
SessionOptionsImpl & | SetLogSeverityLevel (int level)
| Wraps OrtApi::SetSessionLogSeverityLevel.
SessionOptionsImpl & | Add (OrtCustomOpDomain *custom_op_domain)
| Wraps OrtApi::AddCustomOpDomain.
SessionOptionsImpl & | DisablePerSessionThreads ()
| Wraps OrtApi::DisablePerSessionThreads.
SessionOptionsImpl & | AddConfigEntry (const char *config_key, const char *config_value)
| Wraps OrtApi::AddSessionConfigEntry.
SessionOptionsImpl & | AddInitializer (const char *name, const OrtValue *ort_val)
| Wraps OrtApi::AddInitializer.
SessionOptionsImpl & | AddExternalInitializers (const std::vector< std::string > &names, const std::vector< Value > &ort_values)
| Wraps OrtApi::AddExternalInitializers.
SessionOptionsImpl & | AppendExecutionProvider_CUDA (const OrtCUDAProviderOptions &provider_options)
| Wraps OrtApi::SessionOptionsAppendExecutionProvider_CUDA.
SessionOptionsImpl & | AppendExecutionProvider_CUDA_V2 (const OrtCUDAProviderOptionsV2 &provider_options)
| Wraps OrtApi::SessionOptionsAppendExecutionProvider_CUDA_V2.
SessionOptionsImpl & | AppendExecutionProvider_ROCM (const OrtROCMProviderOptions &provider_options)
| Wraps OrtApi::SessionOptionsAppendExecutionProvider_ROCM.
SessionOptionsImpl & | AppendExecutionProvider_OpenVINO (const OrtOpenVINOProviderOptions &provider_options)
| Wraps OrtApi::SessionOptionsAppendExecutionProvider_OpenVINO.
SessionOptionsImpl & | AppendExecutionProvider_TensorRT (const OrtTensorRTProviderOptions &provider_options)
| Wraps OrtApi::SessionOptionsAppendExecutionProvider_TensorRT.
SessionOptionsImpl & | AppendExecutionProvider_TensorRT_V2 (const OrtTensorRTProviderOptionsV2 &provider_options)
| Wraps OrtApi::SessionOptionsAppendExecutionProvider_TensorRT.
SessionOptionsImpl & | AppendExecutionProvider_MIGraphX (const OrtMIGraphXProviderOptions &provider_options)
| Wraps OrtApi::SessionOptionsAppendExecutionProvider_CANN.
SessionOptionsImpl & | AppendExecutionProvider_CANN (const OrtCANNProviderOptions &provider_options)
| Wraps OrtApi::SessionOptionsAppendExecutionProvider_Dnnl.
SessionOptionsImpl & | AppendExecutionProvider_Dnnl (const OrtDnnlProviderOptions &provider_options)
SessionOptionsImpl & | AppendExecutionProvider (const std::string &provider_name, const std::unordered_map< std::string, std::string > &provider_options={})
| Wraps OrtApi::SessionOptionsAppendExecutionProvider. Currently supports SNPE and XNNPACK.
SessionOptionsImpl & | SetCustomCreateThreadFn (OrtCustomCreateThreadFn ort_custom_create_thread_fn)
| Wraps OrtApi::SessionOptionsSetCustomCreateThreadFn.
SessionOptionsImpl & | SetCustomThreadCreationOptions (void *ort_custom_thread_creation_options)
| Wraps OrtApi::SessionOptionsSetCustomThreadCreationOptions.
SessionOptionsImpl & | SetCustomJoinThreadFn (OrtCustomJoinThreadFn ort_custom_join_thread_fn)
| Wraps OrtApi::SessionOptionsSetCustomJoinThreadFn.
SessionOptionsImpl & | RegisterCustomOpsLibrary (const char *library_name, const CustomOpConfigs &custom_op_configs={})
SessionOptionsImpl & | RegisterCustomOpsUsingFunction (const char *function_name)
| Wraps OrtApi::RegisterCustomOpsUsingFunction.
Public Member Functions inherited from Ort::detail::ConstSessionOptionsImpl< T >
SessionOptions | Clone () const
| Creates and returns a copy of this SessionOptions object. Wraps OrtApi::CloneSessionOptions.
std::string | GetConfigEntry (const char *config_key) const
| Wraps OrtApi::GetSessionConfigEntry.
bool | HasConfigEntry (const char *config_key) const
| Wraps OrtApi::HasSessionConfigEntry.
std::string | GetConfigEntryOrDefault (const char *config_key, const std::string &def)
Public Member Functions inherited from Ort::detail::Base< T >
constexpr | Base ()=default
constexpr | Base (contained_type *p) noexcept
| ~Base ()
| Base (const Base &)=delete
Base & | operator= (const Base &)=delete
| Base (Base &&v) noexcept
Base & | operator= (Base &&v) noexcept
constexpr | operator contained_type * () const noexcept
contained_type * | release ()
| Relinquishes ownership of the contained C object pointer The underlying object is not destroyed.

## Additional Inherited Members

Public Types inherited from Ort::detail::SessionOptionsImpl< OrtSessionOptions >
using | B = ConstSessionOptionsImpl< OrtSessionOptions >
using | B = Base< OrtSessionOptions >
Public Types inherited from Ort::detail::ConstSessionOptionsImpl< T >
using | B = Base< T >
Public Types inherited from Ort::detail::Base< T >
using | contained_type = T
Protected Attributes inherited from Ort::detail::Base< T >
contained_type * | p_ {}

## Detailed Description

Wrapper around OrtSessionOptions.

## 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 | ( |  | ) |

Wraps OrtApi::CreateSessionOptions.

## SessionOptions() [3/3]

Ort::SessionOptions::SessionOptions | ( | OrtSessionOptions * | p | ) |

inlineexplicit

Used for interop with the C API.

## Member Function Documentation

## GetConst()

ConstSessionOptions Ort::SessionOptions::GetConst | ( |  | ) | const

inline

## GetUnowned()

UnownedSessionOptions Ort::SessionOptions::GetUnowned | ( |  | ) | const

inline