HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
onnxruntime Namespace Reference

Namespaces

 common
 
 concurrency
 
 contrib
 
 data_types_internal
 
 detail
 
 details
 
 fbs
 
 logging
 
 ml
 
 optimizer_utils
 
 profiling
 
 synchronize
 
 utils
 

Classes

struct  CodeLocation
 
struct  null_type
 
class  ConstPointerContainer
 
class  NotImplementedException
 
class  TypeMismatchException
 
class  OnnxRuntimeException
 
class  InlinedHashSet
 
class  InlinedHashMap
 
class  NodeHashSet
 
class  NodeHashMap
 
struct  CalculateInlinedVectorDefaultInlinedElements
 
class  ORTInvoker
 
class  IAllocator
 
class  CPUAllocator
 
class  BufferDeleter
 
class  CustomRegistry
 
class  DataTypeImpl
 Base class for MLDataType. More...
 
class  TensorTypeBase
 All tensors base. More...
 
class  TensorType
 Tensor type. This type does not have a C++ type associated with it at registration time except the element type. One of the types mentioned above at IsTensorContainedType<> list is acceptable. More...
 
class  SparseTensorTypeBase
 Common base-class for all sparse-tensors (with different element types). More...
 
class  SparseTensorType
 
class  OptionalTypeBase
 Common base-class for all optional types. More...
 
class  OptionalType
 
struct  NonTensorTypeConverter
 Provide a specialization for your C++ Non-tensor type so your implementation FromDataTypeContainer/ToDataTypeContainer functions correctly. Otherwise you get a default implementation which may not be what you need/want. More...
 
class  NonTensorTypeBase
 Base type for all non-tensors, maps, sequences and opaques. More...
 
class  NonTensorType
 
class  MapType
 MapType. Use this type to register mapping types. More...
 
class  SequenceType
 SequenceType. Use to register sequence for non-tensor types. More...
 
class  SequenceTensorTypeBase
 SequenceTensorTypeBase serves as a base type class for Tensor sequences. Akin to TensorTypeBase. Runtime representation is always TensorSeq. More...
 
class  SequenceTensorType
 SequenceTensorType. Use to register sequence for non-tensor types. More...
 
class  OpaqueType
 OpaqueType. More...
 
class  PrimitiveDataTypeBase
 PrimitiveDataTypeBase Base class for primitive Tensor contained types. More...
 
class  PrimitiveDataType
 PrimitiveDataType Typed specialization for primitive types. Concrete instances of this class are used by Tensor. More...
 
struct  NodeComputeInfo
 
class  IExecutionProvider
 
struct  MLFloat16
 
struct  BFloat16
 
struct  ComputeContext
 
class  KernelDef
 
class  KernelDefBuilder
 
class  KernelRegistry
 
class  OpKernel
 
struct  KernelCreateInfo
 
struct  BuildKernelDefConstraintsImpl
 
struct  BuildKernelDefSparseConstraintsImpl
 
class  OpKernelContext
 
class  OpKernelInfo
 
class  OpNodeProtoHelper
 
class  ProtoHelperNodeContext
 
class  ProviderOptionsParser
 
class  SparseTensor
 This class implements SparseTensor. This class holds sparse non-zero data (values) and sparse format specific indices. There are two main uses for the class (similar to that of Tensor) More...
 
class  Stream
 
class  IStreamCommandHandleRegistry
 
class  Tensor
 
class  TensorShape
 
class  Function
 
class  Node
 
class  Graph
 
class  ValidNodes
 
class  GraphNodes
 
class  ConstGraphNodes
 
struct  NodeCompare
 
class  GraphViewer
 
class  IndexedSubGraph
 
class  NodeArg
 
struct  SchemaRegistryVersion
 
class  IOnnxRuntimeOpSchemaCollection
 
class  OnnxRuntimeOpSchemaRegistry
 
class  SchemaRegistryManager
 
class  GraphTransformer
 
struct  GraphTransformerConfiguration
 
class  RewriteRule
 
class  RuleBasedGraphTransformer
 
class  Barrier
 
struct  Notification
 
class  OrtMutex
 
class  OrtCondVar
 
struct  TensorOpCost
 
struct  IExecutionProviderFactory
 
class  Environment
 

Typedefs

using HashValue = uint64_t
 
using TimePoint = std::chrono::high_resolution_clock::time_point
 
template<typename T , size_t N = CalculateInlinedVectorDefaultInlinedElements<T>::value, typename Allocator = std::allocator<T>>
using InlinedVector = absl::InlinedVector< T, N, Allocator >
 
using WaitNotificationFn = std::function< void(Stream &, synchronize::Notification &)>
 
template<typename T >
using IAllocatorUniquePtr = std::unique_ptr< T, std::function< void(T *)>>
 
using AllocatorPtr = std::shared_ptr< IAllocator >
 
using BufferUniquePtr = std::unique_ptr< void, BufferDeleter >
 
using BufferNakedPtr = void *
 
using MapStringToString = std::map< std::string, std::string >
 Predefined registered types. More...
 
using MapStringToInt64 = std::map< std::string, int64_t >
 
using MapStringToFloat = std::map< std::string, float >
 
using MapStringToDouble = std::map< std::string, double >
 
using MapInt64ToString = std::map< int64_t, std::string >
 
using MapInt64ToInt64 = std::map< int64_t, int64_t >
 
using MapInt64ToFloat = std::map< int64_t, float >
 
using MapInt64ToDouble = std::map< int64_t, double >
 
using VectorMapStringToFloat = std::vector< MapStringToFloat >
 
using VectorMapInt64ToFloat = std::vector< MapInt64ToFloat >
 
using VectorString = std::vector< std::string >
 
using VectorInt64 = std::vector< int64_t >
 
using MLDataType = const DataTypeImpl *
 
using DeleteFunc = void(*)(void *)
 
using CreateFunc ) = void *(*)(
 
using CreateFunctionStateFunc = std::function< int(ComputeContext *, FunctionState *)>
 
using ComputeFunc = std::function< Status(FunctionState, const OrtApi *, OrtKernelContext *)>
 
using DestroyFunctionStateFunc = std::function< void(FunctionState)>
 
using InputDefList = std::vector< const onnxruntime::NodeArg * >
 
using OutputDefList = std::vector< const onnxruntime::NodeArg * >
 
using NameMLValMap = std::unordered_map< std::string, OrtValue >
 
using AllocateFunc = void *(*)(void *, size_t, size_t)
 
using DestroyFunc = void(*)(void *, void *)
 
using AllocatorHandle = void *
 
using FunctionState = void *
 
using CreateFunctionStateC = int(*)(ComputeContext *, FunctionState *)
 
using ComputeFuncC = common::Status(*)(FunctionState, const OrtApi *, OrtKernelContext *)
 
using DestroyFunctionStateC = void(*)(FunctionState)
 
typedef std::map< size_t,
OrtMemType
MemTypeMap
 
using KernelCreateMap = std::multimap< std::string, KernelCreateInfo >
 
using KernelDefHashes = std::vector< std::pair< std::string, HashValue >>
 
using KernelCreateFn = std::function< Status(FuncManager &func_mgr, const OpKernelInfo &info, std::unique_ptr< OpKernel > &out)>
 
using KernelCreatePtrFn = std::add_pointer< Status(FuncManager &func_mgr, const OpKernelInfo &info, std::unique_ptr< OpKernel > &out)>::type
 
using BuildKernelCreateInfoFn ) = KernelCreateInfo(*)(
 
using ProviderOptions = std::unordered_map< std::string, std::string >
 
using ProviderOptionsVector = std::vector< ProviderOptions >
 
using ProviderOptionsMap = std::unordered_map< std::string, ProviderOptions >
 
template<typename TEnum >
using EnumNameMapping = std::vector< std::pair< TEnum, std::string >>
 
using RunOptions = OrtRunOptions
 
using NotificationHandle = void *
 
using StreamHandle = void *
 
using CreateStreamFn = std::function< std::unique_ptr< Stream >(const OrtDevice &)>
 
using TensorShapeVector = absl::InlinedVector< int64_t, kTensorShapeSmallBufferElementsSize >
 
using NodeIndex = size_t
 
using Version = int64_t
 
using NodeArgInfo = ONNX_NAMESPACE::ValueInfoProto
 
using InitializedTensorSet = std::unordered_map< std::string, const ONNX_NAMESPACE::TensorProto * >
 
using ArgNameToTypeMap = std::unordered_map< std::string, ONNX_NAMESPACE::TypeProto >
 
using ProviderType = const std::string &
 
using NodeAttributes = std::unordered_map< std::string, ONNX_NAMESPACE::AttributeProto >
 
using IOnnxRuntimeOpSchemaCollectionPtr = std::shared_ptr< IOnnxRuntimeOpSchemaCollection >
 
using OpName_Domain_Version_Schema_Map = std::unordered_map< std::string, std::unordered_map< std::string, std::map< ONNX_NAMESPACE::OperatorSetVersion, ONNX_NAMESPACE::OpSchema >>>
 
using DomainToVersionMap = std::unordered_map< std::string, int >
 
using DomainToVersionRangeMap = std::unordered_map< std::string, SchemaRegistryVersion >
 

Enumerations

enum  ArgType : uint8_t { ArgType::kInput, ArgType::kOutput }
 
enum  AllocKind {
  AllocKind::kNotSet = -1, AllocKind::kAllocate = 0, AllocKind::kReuse = 1, AllocKind::kPreExisting = 2,
  AllocKind::kAllocateStatically = 3, AllocKind::kAllocateOutput = 4, AllocKind::kShare = 5, AllocKind::kAllocatedExternally = 6
}
 
enum  endian
 
enum  DataLayout { DataLayout::NCHW, DataLayout::NHWC, DataLayout::NCHWC }
 
enum  SparseFormat : uint32_t { SparseFormat::kUndefined = 0x0U, SparseFormat::kCoo = 0x1U, SparseFormat::kCsrc = 0x1U << 1, SparseFormat::kBlockSparse = 0x1U << 2 }
 This is a Sparse Format enumeration. More...
 
enum  TransformerLevel : int {
  TransformerLevel::Default = 0, TransformerLevel::Level1, TransformerLevel::Level2, TransformerLevel::Level3,
  TransformerLevel::MaxLevel = Level3
}
 

Functions

std::vector< std::stringGetStackTrace ()
 
void LogRuntimeError (uint32_t session_id, const common::Status &status, const char *file, const char *function, uint32_t line)
 
long long TimeDiffMicroSeconds (TimePoint start_time)
 
long long TimeDiffMicroSeconds (TimePoint start_time, TimePoint end_time)
 
std::string ToUTF8String (const std::string &s)
 
std::string ToWideString (const std::string &s)
 
template<typename Key , typename... OtherContainerArgs, template< typename...> typename AssociativeContainer, typename LookupKey >
bool Contains (const AssociativeContainer< Key, OtherContainerArgs...> &container, LookupKey &&key)
 
bool SetDenormalAsZero (bool on)
 
void HashCombineWithHashValue (size_t h, size_t &seed)
 
template<typename T , typename Hash = std::hash<T>>
void HashCombine (const T &value, size_t &seed)
 
template<typename... Args>
std::string MakeString (const Args &...args)
 
template<typename... Args>
std::string MakeStringWithClassicLocale (const Args &...args)
 
std::string MakeString (const std::string &str)
 
std::string MakeString (const char *cstr)
 
std::string MakeStringWithClassicLocale (const std::string &str)
 
std::string MakeStringWithClassicLocale (const char *cstr)
 
template<typename T >
bool TryParseStringWithClassicLocale (std::string_view str, T &value)
 
bool TryParseStringWithClassicLocale (std::string_view str, std::string &value)
 
bool TryParseStringWithClassicLocale (std::string_view str, bool &value)
 
template<typename T >
Status ParseStringWithClassicLocale (std::string_view s, T &value)
 
template<typename T >
ParseStringWithClassicLocale (std::string_view s)
 
template<class C >
constexpr auto AsSpan (C &c)
 
template<class C >
constexpr auto AsSpan (const C &c)
 
template<class C >
constexpr auto AsSpan (C &&c)
 
template<class T >
constexpr auto AsSpan (std::initializer_list< T > c)
 
template<class T , size_t N>
constexpr auto AsSpan (T(&arr)[N])
 
template<class T , size_t N>
constexpr auto AsSpan (const T(&arr)[N])
 
template<class T >
gsl::span< const T > EmptySpan ()
 
template<class U , class T >
gsl::span< U > ReinterpretAsSpan (gsl::span< T > src)
 
template<class T1 , size_t Extent1, class T2 , size_t Extent2>
bool SpanEq (gsl::span< T1, Extent1 > a, gsl::span< T2, Extent2 > b)
 
char * StrDup (const std::string &str, OrtAllocator *allocator)
 
std::ostream & operator<< (std::ostream &out, AllocKind alloc_kind)
 
voidAllocateBufferWithOptions (IAllocator &allocator, size_t size, bool use_reserve, Stream *stream, WaitNotificationFn wait_fn)
 
voidAllocatorDefaultAlloc (size_t size)
 
void AllocatorDefaultFree (void *p)
 
std::ostream & operator<< (std::ostream &out, MLDataType data_type)
 
bool operator== (const MLFloat16 &left, const MLFloat16 &right)
 
bool operator!= (const MLFloat16 &left, const MLFloat16 &right)
 
bool operator< (const MLFloat16 &left, const MLFloat16 &right)
 
ORT_HOST_DEVICE bool operator== (const BFloat16 &left, const BFloat16 &right)
 
ORT_HOST_DEVICE bool operator!= (const BFloat16 &left, const BFloat16 &right)
 
ORT_HOST_DEVICE bool operator< (const BFloat16 &left, const BFloat16 &right)
 
MLFloat16 operator""_f16 (unsigned long long int v)
 
MLFloat16 operator""_fp16 (long double v)
 
BFloat16 operator""_b16 (unsigned long long int v)
 
BFloat16 operator""_bfp16 (long double v)
 
void BFloat16ToFloat (const BFloat16 *blf, float *flt, size_t size)
 
void FloatToBFloat16 (const float *flt, BFloat16 *blf, size_t size)
 
std::unique_ptr< OpKernelInfoCopyOpKernelInfo (const OpKernelInfo &info)
 
template<typename T >
KernelCreateInfo BuildKernelCreateInfo ()
 
template<typename... Types>
std::vector< MLDataTypeBuildKernelDefConstraints ()
 
template<typename... Types>
std::vector< MLDataTypeBuildKernelDefSparseConstraints ()
 
template<typename L >
std::vector< MLDataTypeBuildKernelDefConstraintsFromTypeList ()
 
template<typename L >
std::vector< MLDataTypeBuildKernelDefSparseConstraintsFromTypeList ()
 
template<typename TEnum >
Status EnumToName (const EnumNameMapping< TEnum > &mapping, TEnum value, std::string &name)
 
template<typename TEnum >
std::string EnumToName (const EnumNameMapping< TEnum > &mapping, TEnum value)
 
template<typename TEnum >
Status NameToEnum (const EnumNameMapping< TEnum > &mapping, const std::string &name, TEnum &value)
 
template<typename TEnum >
TEnum NameToEnum (const EnumNameMapping< TEnum > &mapping, const std::string &name)
 
void UnloadSharedProviders ()
 
std::ostream & operator<< (std::ostream &, SparseFormat)
 
TensorShapeVector ToShapeVector (const gsl::span< const int64_t > &span)
 
gsl::span< const int64_t > ToConstSpan (const TensorShapeVector &vec)
 
std::ostream & operator<< (std::ostream &out, const TensorShape &shape)
 
std::ostream & operator<< (std::ostream &out, const NodeArg &node_arg)
 
std::ostream & operator<< (std::ostream &out, const Node &node)
 
std::ostream & operator<< (std::ostream &out, const Graph &graph)
 
constexpr
GraphTransformerConfiguration::PropagateCastOpsConfiguration::Strategy 
operator| (GraphTransformerConfiguration::PropagateCastOpsConfiguration::Strategy, GraphTransformerConfiguration::PropagateCastOpsConfiguration::Strategy)
 
constexpr
GraphTransformerConfiguration::PropagateCastOpsConfiguration::Strategy 
operator& (GraphTransformerConfiguration::PropagateCastOpsConfiguration::Strategy, GraphTransformerConfiguration::PropagateCastOpsConfiguration::Strategy)
 
constexpr bool operator== (GraphTransformerConfiguration::PropagateCastOpsConfiguration::Strategy, GraphTransformerConfiguration::PropagateCastOpsConfiguration::Strategy)
 
constexpr bool operator!= (GraphTransformerConfiguration::PropagateCastOpsConfiguration::Strategy, GraphTransformerConfiguration::PropagateCastOpsConfiguration::Strategy)
 

Variables

constexpr size_t kMaxStrLen = 2048
 
constexpr const char * CPU = "Cpu"
 
constexpr const char * CUDA = "Cuda"
 
constexpr const char * CUDA_PINNED = "CudaPinned"
 
constexpr const char * CANN = "Cann"
 
constexpr const char * CANN_PINNED = "CannPinned"
 
constexpr const char * DML = "DML"
 
constexpr const char * HIP = "Hip"
 
constexpr const char * HIP_PINNED = "HipPinned"
 
constexpr const char * OpenVINO_CPU = "OpenVINO_CPU"
 
constexpr const char * OpenVINO_GPU = "OpenVINO_GPU"
 
constexpr size_t kAllocAlignment = 256
 
constexpr size_t kTensorShapeSmallBufferElementsSize = 5
 
constexpr const char * kNoOp = "NoOp"
 
constexpr const char * kConstant = "Constant"
 
constexpr const char * kFunctionOp = "_kFunctionOp"
 
constexpr const char * kConstantValue = "value"
 
constexpr const char * kOnnxDomain = ""
 
constexpr const char * kOnnxDomainAlias = "ai.onnx"
 
constexpr const char * kMLDomain = "ai.onnx.ml"
 
constexpr const char * kMSDomain = "com.microsoft"
 
constexpr const char * kPytorchAtenDomain = "org.pytorch.aten"
 
constexpr const char * kMSExperimentalDomain = "com.microsoft.experimental"
 
constexpr const char * kMSNchwcDomain = "com.microsoft.nchwc"
 
constexpr const char * kMSInternalNHWCDomain = "com.ms.internal.nhwc"
 
constexpr const char * kMSDmlDomain = "com.microsoft.dml"
 
constexpr const char * kNGraphDomain = "com.intel.ai"
 
constexpr const char * kMIGraphXDomain = ""
 
constexpr const char * kVitisAIDomain = "com.xilinx"
 
constexpr const char * kCpuExecutionProvider = "CPUExecutionProvider"
 
constexpr const char * kCudaExecutionProvider = "CUDAExecutionProvider"
 
constexpr const char * kDnnlExecutionProvider = "DnnlExecutionProvider"
 
constexpr const char * kOpenVINOExecutionProvider = "OpenVINOExecutionProvider"
 
constexpr const char * kVitisAIExecutionProvider = "VitisAIExecutionProvider"
 
constexpr const char * kTensorrtExecutionProvider = "TensorrtExecutionProvider"
 
constexpr const char * kNnapiExecutionProvider = "NnapiExecutionProvider"
 
constexpr const char * kRknpuExecutionProvider = "RknpuExecutionProvider"
 
constexpr const char * kDmlExecutionProvider = "DmlExecutionProvider"
 
constexpr const char * kMIGraphXExecutionProvider = "MIGraphXExecutionProvider"
 
constexpr const char * kAclExecutionProvider = "ACLExecutionProvider"
 
constexpr const char * kArmNNExecutionProvider = "ArmNNExecutionProvider"
 
constexpr const char * kRocmExecutionProvider = "ROCMExecutionProvider"
 
constexpr const char * kCoreMLExecutionProvider = "CoreMLExecutionProvider"
 
constexpr const char * kSnpeExecutionProvider = "SNPEExecutionProvider"
 
constexpr const char * kTvmExecutionProvider = "TvmExecutionProvider"
 
constexpr const char * kXnnpackExecutionProvider = "XnnpackExecutionProvider"
 
constexpr const char * kCannExecutionProvider = "CANNExecutionProvider"
 
constexpr const char * kAzureExecutionProvider = "AzureExecutionProvider"
 
constexpr const char * kExecutionProviderSharedLibraryPath = "shared_lib_path"
 
constexpr const char * kExecutionProviderSharedLibraryEntry = "provider_factory_entry_point"
 

Detailed Description

Copyright (c) 2016-present, Facebook, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Typedef Documentation

using onnxruntime::AllocateFunc = typedef void* (*)(void*, size_t, size_t)

Definition at line 8 of file func_api.h.

Definition at line 10 of file func_api.h.

using onnxruntime::AllocatorPtr = typedef std::shared_ptr<IAllocator>

Definition at line 190 of file allocator.h.

using onnxruntime::ArgNameToTypeMap = typedef std::unordered_map<std::string, ONNX_NAMESPACE::TypeProto>

Definition at line 34 of file basic_types.h.

Definition at line 35 of file buffer_deleter.h.

using onnxruntime::BufferUniquePtr = typedef std::unique_ptr<void, BufferDeleter>

Definition at line 34 of file buffer_deleter.h.

using onnxruntime::BuildKernelCreateInfoFn = typedef KernelCreateInfo (*)(

Definition at line 189 of file op_kernel.h.

using onnxruntime::ComputeFunc = typedef std::function<Status(FunctionState, const OrtApi*, OrtKernelContext*)>

Definition at line 43 of file execution_provider.h.

Definition at line 24 of file func_api.h.

using onnxruntime::CreateFunc = typedef void* (*)(

Definition at line 75 of file data_types.h.

Definition at line 22 of file func_api.h.

Logical device representation.

Definition at line 42 of file execution_provider.h.

using onnxruntime::CreateStreamFn = typedef std::function<std::unique_ptr<Stream>(const OrtDevice&)>

Definition at line 148 of file stream_handles.h.

using onnxruntime::DeleteFunc = typedef void (*)(void*)

Definition at line 74 of file data_types.h.

using onnxruntime::DestroyFunc = typedef void (*)(void*, void*)

Definition at line 9 of file func_api.h.

Definition at line 26 of file func_api.h.

using onnxruntime::DestroyFunctionStateFunc = typedef std::function<void(FunctionState)>

Definition at line 44 of file execution_provider.h.

using onnxruntime::DomainToVersionMap = typedef std::unordered_map<std::string, int>

Definition at line 34 of file schema_registry.h.

Definition at line 35 of file schema_registry.h.

template<typename TEnum >
using onnxruntime::EnumNameMapping = typedef std::vector<std::pair<TEnum, std::string>>

Definition at line 19 of file provider_options_utils.h.

using onnxruntime::FunctionState = typedef void*

Definition at line 20 of file func_api.h.

using onnxruntime::HashValue = typedef uint64_t

A computed hash value.

Definition at line 11 of file basic_types.h.

template<typename T >
using onnxruntime::IAllocatorUniquePtr = typedef std::unique_ptr<T, std::function<void(T*)>>

Definition at line 58 of file allocator.h.

using onnxruntime::InitializedTensorSet = typedef std::unordered_map<std::string, const ONNX_NAMESPACE::TensorProto*>

Definition at line 33 of file basic_types.h.

template<typename T , size_t N = CalculateInlinedVectorDefaultInlinedElements<T>::value, typename Allocator = std::allocator<T>>
using onnxruntime::InlinedVector = typedef absl::InlinedVector<T, N, Allocator>

Definition at line 122 of file inlined_containers_fwd.h.

using onnxruntime::InputDefList = typedef std::vector<const onnxruntime::NodeArg*>

Definition at line 18 of file framework_common.h.

Definition at line 44 of file basic_types.h.

typedef std::function< onnxruntime::common::Status(FuncManager &func_mgr, const OpKernelInfo &info, std::unique_ptr< OpKernel > &out)> onnxruntime::KernelCreateFn

Definition at line 134 of file op_kernel.h.

Definition at line 12 of file kernel_registry.h.

using onnxruntime::KernelCreatePtrFn = typedef std::add_pointer<Status(FuncManager& func_mgr, const OpKernelInfo& info, std::unique_ptr<OpKernel>& out)>::type

Definition at line 135 of file op_kernel.h.

using onnxruntime::KernelDefHashes = typedef std::vector<std::pair<std::string, HashValue>>

Definition at line 13 of file kernel_registry.h.

using onnxruntime::MapInt64ToDouble = typedef std::map<int64_t, double>

Definition at line 45 of file data_types.h.

using onnxruntime::MapInt64ToFloat = typedef std::map<int64_t, float>

Definition at line 44 of file data_types.h.

using onnxruntime::MapInt64ToInt64 = typedef std::map<int64_t, int64_t>

Definition at line 43 of file data_types.h.

using onnxruntime::MapInt64ToString = typedef std::map<int64_t, std::string>

Definition at line 42 of file data_types.h.

using onnxruntime::MapStringToDouble = typedef std::map<std::string, double>

Definition at line 41 of file data_types.h.

using onnxruntime::MapStringToFloat = typedef std::map<std::string, float>

Definition at line 40 of file data_types.h.

using onnxruntime::MapStringToInt64 = typedef std::map<std::string, int64_t>

Definition at line 39 of file data_types.h.

Predefined registered types.

Definition at line 38 of file data_types.h.

typedef std::map<size_t, OrtMemType> onnxruntime::MemTypeMap

Definition at line 19 of file kernel_def_builder.h.

Definition at line 72 of file data_types.h.

using onnxruntime::NameMLValMap = typedef std::unordered_map<std::string, OrtValue>

Definition at line 21 of file framework_common.h.

using onnxruntime::NodeArgInfo = typedef ONNX_NAMESPACE::ValueInfoProto

Definition at line 32 of file basic_types.h.

using onnxruntime::NodeAttributes = typedef std::unordered_map<std::string, ONNX_NAMESPACE::AttributeProto>

Definition at line 42 of file basic_types.h.

using onnxruntime::NodeIndex = typedef size_t

Definition at line 30 of file basic_types.h.

Definition at line 15 of file stream_handles.h.

using onnxruntime::OpName_Domain_Version_Schema_Map = typedef std::unordered_map< std::string, std::unordered_map<std::string, std::map<ONNX_NAMESPACE::OperatorSetVersion, ONNX_NAMESPACE::OpSchema>>>

Definition at line 22 of file schema_registry.h.

using onnxruntime::OutputDefList = typedef std::vector<const onnxruntime::NodeArg*>

Definition at line 19 of file framework_common.h.

using onnxruntime::ProviderOptions = typedef std::unordered_map<std::string, std::string>

Definition at line 14 of file provider_options.h.

using onnxruntime::ProviderOptionsMap = typedef std::unordered_map<std::string, ProviderOptions>

Definition at line 16 of file provider_options.h.

Definition at line 15 of file provider_options.h.

Definition at line 35 of file basic_types.h.

Definition at line 48 of file run_options.h.

using onnxruntime::StreamHandle = typedef void*

Definition at line 17 of file stream_handles.h.

using onnxruntime::TensorShapeVector = typedef absl::InlinedVector<int64_t, kTensorShapeSmallBufferElementsSize>

Definition at line 46 of file tensor_shape.h.

using onnxruntime::TimePoint = typedef std::chrono::high_resolution_clock::time_point

Definition at line 43 of file common.h.

using onnxruntime::VectorInt64 = typedef std::vector<int64_t>

Definition at line 54 of file data_types.h.

Definition at line 49 of file data_types.h.

Definition at line 48 of file data_types.h.

using onnxruntime::VectorString = typedef std::vector<std::string>

Definition at line 53 of file data_types.h.

using onnxruntime::Version = typedef int64_t

Definition at line 31 of file basic_types.h.

Definition at line 54 of file allocator.h.

Enumeration Type Documentation

Enumerator
kNotSet 
kAllocate 
kReuse 
kPreExisting 
kAllocateStatically 
kAllocateOutput 
kShare 
kAllocatedExternally 

Definition at line 24 of file alloc_kind.h.

enum onnxruntime::ArgType : uint8_t
strong

The type of an argument (input or output).

Enumerator
kInput 
kOutput 

Definition at line 14 of file basic_types.h.

Enumerator
NCHW 
NHWC 
NCHWC 

Definition at line 52 of file execution_provider.h.

enum onnxruntime::endian
strong

Definition at line 9 of file endian.h.

enum onnxruntime::SparseFormat : uint32_t
strong

This is a Sparse Format enumeration.

Enumerator
kUndefined 
kCoo 
kCsrc 
kBlockSparse 

Definition at line 24 of file sparse_tensor.h.

Enumerator
Default 
Level1 
Level2 
Level3 
MaxLevel 

Definition at line 10 of file graph_transformer_level.h.

Function Documentation

void* onnxruntime::AllocateBufferWithOptions ( IAllocator &  allocator,
size_t  size,
bool  use_reserve,
Stream *  stream,
WaitNotificationFn  wait_fn 
)
void* onnxruntime::AllocatorDefaultAlloc ( size_t  size)
void onnxruntime::AllocatorDefaultFree ( void p)
template<class C >
constexpr auto onnxruntime::AsSpan ( C &  c)

Definition at line 41 of file span_utils.h.

template<class C >
constexpr auto onnxruntime::AsSpan ( const C &  c)

Definition at line 46 of file span_utils.h.

template<class C >
constexpr auto onnxruntime::AsSpan ( C &&  c)

Definition at line 51 of file span_utils.h.

template<class T >
constexpr auto onnxruntime::AsSpan ( std::initializer_list< T >  c)

Definition at line 56 of file span_utils.h.

template<class T , size_t N>
constexpr auto onnxruntime::AsSpan ( T(&)  arr[N])

Definition at line 61 of file span_utils.h.

template<class T , size_t N>
constexpr auto onnxruntime::AsSpan ( const T(&)  arr[N])

Definition at line 66 of file span_utils.h.

void onnxruntime::BFloat16ToFloat ( const BFloat16 *  blf,
float flt,
size_t  size 
)
inline

Definition at line 143 of file float16.h.

template<typename T >
KernelCreateInfo onnxruntime::BuildKernelCreateInfo ( )
template<typename... Types>
std::vector<MLDataType> onnxruntime::BuildKernelDefConstraints ( )
inline

Definition at line 359 of file op_kernel.h.

template<typename L >
std::vector<MLDataType> onnxruntime::BuildKernelDefConstraintsFromTypeList ( )
inline

Definition at line 372 of file op_kernel.h.

template<typename... Types>
std::vector<MLDataType> onnxruntime::BuildKernelDefSparseConstraints ( )
inline

Definition at line 365 of file op_kernel.h.

template<typename L >
std::vector<MLDataType> onnxruntime::BuildKernelDefSparseConstraintsFromTypeList ( )
inline

Definition at line 378 of file op_kernel.h.

template<typename Key , typename... OtherContainerArgs, template< typename...> typename AssociativeContainer, typename LookupKey >
bool onnxruntime::Contains ( const AssociativeContainer< Key, OtherContainerArgs...> &  container,
LookupKey &&  key 
)
inline

Definition at line 283 of file common.h.

std::unique_ptr<OpKernelInfo> onnxruntime::CopyOpKernelInfo ( const OpKernelInfo &  info)
template<class T >
gsl::span<const T> onnxruntime::EmptySpan ( )
inline

Definition at line 71 of file span_utils.h.

template<typename TEnum >
Status onnxruntime::EnumToName ( const EnumNameMapping< TEnum > &  mapping,
TEnum  value,
std::string name 
)

Given a mapping and an enumeration value, gets the corresponding name.

Definition at line 25 of file provider_options_utils.h.

template<typename TEnum >
std::string onnxruntime::EnumToName ( const EnumNameMapping< TEnum > &  mapping,
TEnum  value 
)

Definition at line 39 of file provider_options_utils.h.

void onnxruntime::FloatToBFloat16 ( const float flt,
BFloat16 *  blf,
size_t  size 
)
inline

Definition at line 151 of file float16.h.

std::vector<std::string> onnxruntime::GetStackTrace ( )
template<typename T , typename Hash = std::hash<T>>
void onnxruntime::HashCombine ( const T &  value,
size_t &  seed 
)
inline

Definition at line 17 of file hash_combine.h.

void onnxruntime::HashCombineWithHashValue ( size_t  h,
size_t &  seed 
)
inline

Definition at line 10 of file hash_combine.h.

void onnxruntime::LogRuntimeError ( uint32_t  session_id,
const common::Status &  status,
const char *  file,
const char *  function,
uint32_t  line 
)
template<typename... Args>
std::string onnxruntime::MakeString ( const Args &...  args)

Makes a string by concatenating string representations of the arguments. This version uses the current locale.

Definition at line 81 of file make_string.h.

std::string onnxruntime::MakeString ( const std::string str)
inline

Definition at line 110 of file make_string.h.

std::string onnxruntime::MakeString ( const char *  cstr)
inline

Definition at line 114 of file make_string.h.

template<typename... Args>
std::string onnxruntime::MakeStringWithClassicLocale ( const Args &...  args)

Makes a string by concatenating string representations of the arguments. This version uses std::locale::classic().

Definition at line 101 of file make_string.h.

std::string onnxruntime::MakeStringWithClassicLocale ( const std::string str)
inline

Definition at line 118 of file make_string.h.

std::string onnxruntime::MakeStringWithClassicLocale ( const char *  cstr)
inline

Definition at line 122 of file make_string.h.

template<typename TEnum >
Status onnxruntime::NameToEnum ( const EnumNameMapping< TEnum > &  mapping,
const std::string name,
TEnum &  value 
)

Given a mapping and a name, gets the corresponding enumeration value.

Definition at line 49 of file provider_options_utils.h.

template<typename TEnum >
TEnum onnxruntime::NameToEnum ( const EnumNameMapping< TEnum > &  mapping,
const std::string name 
)

Definition at line 64 of file provider_options_utils.h.

bool onnxruntime::operator!= ( const MLFloat16 &  left,
const MLFloat16 &  right 
)
inline

Definition at line 38 of file float16.h.

constexpr bool onnxruntime::operator!= ( GraphTransformerConfiguration::PropagateCastOpsConfiguration::Strategy  ,
GraphTransformerConfiguration::PropagateCastOpsConfiguration::Strategy   
)

Definition at line 48 of file graph_transformer_config.h.

ORT_HOST_DEVICE bool onnxruntime::operator!= ( const BFloat16 &  left,
const BFloat16 &  right 
)
inline

Definition at line 117 of file float16.h.

BFloat16 onnxruntime::operator""_b16 ( unsigned long long int  v)
inline

Definition at line 133 of file float16.h.

BFloat16 onnxruntime::operator""_bfp16 ( long double  v)
inline

Definition at line 137 of file float16.h.

MLFloat16 onnxruntime::operator""_f16 ( unsigned long long int  v)
inline

Definition at line 125 of file float16.h.

MLFloat16 onnxruntime::operator""_fp16 ( long double  v)
inline

Definition at line 129 of file float16.h.

constexpr GraphTransformerConfiguration::PropagateCastOpsConfiguration::Strategy onnxruntime::operator& ( GraphTransformerConfiguration::PropagateCastOpsConfiguration::Strategy  ,
GraphTransformerConfiguration::PropagateCastOpsConfiguration::Strategy   
)

Definition at line 35 of file graph_transformer_config.h.

bool onnxruntime::operator< ( const MLFloat16 &  left,
const MLFloat16 &  right 
)
inline

Definition at line 39 of file float16.h.

ORT_HOST_DEVICE bool onnxruntime::operator< ( const BFloat16 &  left,
const BFloat16 &  right 
)
inline

Definition at line 118 of file float16.h.

std::ostream& onnxruntime::operator<< ( std::ostream &  ,
SparseFormat   
)
std::ostream& onnxruntime::operator<< ( std::ostream &  out,
AllocKind  alloc_kind 
)
std::ostream& onnxruntime::operator<< ( std::ostream &  out,
const TensorShape &  shape 
)
std::ostream& onnxruntime::operator<< ( std::ostream &  out,
MLDataType  data_type 
)
std::ostream& onnxruntime::operator<< ( std::ostream &  out,
const NodeArg &  node_arg 
)
std::ostream& onnxruntime::operator<< ( std::ostream &  out,
const Node node 
)
std::ostream& onnxruntime::operator<< ( std::ostream &  out,
const Graph &  graph 
)
bool onnxruntime::operator== ( const MLFloat16 &  left,
const MLFloat16 &  right 
)
inline

Definition at line 37 of file float16.h.

constexpr bool onnxruntime::operator== ( GraphTransformerConfiguration::PropagateCastOpsConfiguration::Strategy  ,
GraphTransformerConfiguration::PropagateCastOpsConfiguration::Strategy   
)

Definition at line 44 of file graph_transformer_config.h.

ORT_HOST_DEVICE bool onnxruntime::operator== ( const BFloat16 &  left,
const BFloat16 &  right 
)
inline

Definition at line 116 of file float16.h.

constexpr GraphTransformerConfiguration::PropagateCastOpsConfiguration::Strategy onnxruntime::operator| ( GraphTransformerConfiguration::PropagateCastOpsConfiguration::Strategy  ,
GraphTransformerConfiguration::PropagateCastOpsConfiguration::Strategy   
)

Definition at line 26 of file graph_transformer_config.h.

template<typename T >
Status onnxruntime::ParseStringWithClassicLocale ( std::string_view  s,
T &  value 
)

Parses a value from an entire string.

Definition at line 70 of file parse_string.h.

template<typename T >
T onnxruntime::ParseStringWithClassicLocale ( std::string_view  s)

Parses a value from an entire string.

Definition at line 79 of file parse_string.h.

template<class U , class T >
gsl::span<U> onnxruntime::ReinterpretAsSpan ( gsl::span< T >  src)
inline

Definition at line 74 of file span_utils.h.

bool onnxruntime::SetDenormalAsZero ( bool  on)
template<class T1 , size_t Extent1, class T2 , size_t Extent2>
bool onnxruntime::SpanEq ( gsl::span< T1, Extent1 >  a,
gsl::span< T2, Extent2 >  b 
)
inline

Definition at line 82 of file span_utils.h.

char* onnxruntime::StrDup ( const std::string str,
OrtAllocator allocator 
)
long long onnxruntime::TimeDiffMicroSeconds ( TimePoint  start_time)
inline

Definition at line 253 of file common.h.

long long onnxruntime::TimeDiffMicroSeconds ( TimePoint  start_time,
TimePoint  end_time 
)
inline

Definition at line 258 of file common.h.

gsl::span<const int64_t> onnxruntime::ToConstSpan ( const TensorShapeVector &  vec)
inline

Definition at line 64 of file tensor_shape.h.

TensorShapeVector onnxruntime::ToShapeVector ( const gsl::span< const int64_t > &  span)
inline

Definition at line 57 of file tensor_shape.h.

std::string onnxruntime::ToUTF8String ( const std::string s)
inline

Definition at line 263 of file common.h.

std::string onnxruntime::ToWideString ( const std::string s)
inline

Definition at line 273 of file common.h.

template<typename T >
bool onnxruntime::TryParseStringWithClassicLocale ( std::string_view  str,
T &  value 
)

Tries to parse a value from an entire string.

Definition at line 19 of file parse_string.h.

bool onnxruntime::TryParseStringWithClassicLocale ( std::string_view  str,
std::string value 
)
inline

Definition at line 47 of file parse_string.h.

bool onnxruntime::TryParseStringWithClassicLocale ( std::string_view  str,
bool &  value 
)
inline

Definition at line 52 of file parse_string.h.

void onnxruntime::UnloadSharedProviders ( )

Variable Documentation

constexpr const char* onnxruntime::CANN = "Cann"

Definition at line 39 of file allocator.h.

constexpr const char* onnxruntime::CANN_PINNED = "CannPinned"

Definition at line 40 of file allocator.h.

constexpr const char* onnxruntime::CPU = "Cpu"

Definition at line 36 of file allocator.h.

constexpr const char* onnxruntime::CUDA = "Cuda"

Definition at line 37 of file allocator.h.

constexpr const char* onnxruntime::CUDA_PINNED = "CudaPinned"

Definition at line 38 of file allocator.h.

constexpr const char* onnxruntime::DML = "DML"

Definition at line 41 of file allocator.h.

constexpr const char* onnxruntime::HIP = "Hip"

Definition at line 42 of file allocator.h.

constexpr const char* onnxruntime::HIP_PINNED = "HipPinned"

Definition at line 43 of file allocator.h.

constexpr const char* onnxruntime::kAclExecutionProvider = "ACLExecutionProvider"

Definition at line 36 of file constants.h.

constexpr size_t onnxruntime::kAllocAlignment = 256

Definition at line 47 of file allocator.h.

constexpr const char* onnxruntime::kArmNNExecutionProvider = "ArmNNExecutionProvider"

Definition at line 37 of file constants.h.

constexpr const char* onnxruntime::kAzureExecutionProvider = "AzureExecutionProvider"

Definition at line 44 of file constants.h.

constexpr const char* onnxruntime::kCannExecutionProvider = "CANNExecutionProvider"

Definition at line 43 of file constants.h.

constexpr const char* onnxruntime::kConstant = "Constant"

Definition at line 9 of file constants.h.

constexpr const char* onnxruntime::kConstantValue = "value"

Definition at line 11 of file constants.h.

constexpr const char* onnxruntime::kCoreMLExecutionProvider = "CoreMLExecutionProvider"

Definition at line 39 of file constants.h.

constexpr const char* onnxruntime::kCpuExecutionProvider = "CPUExecutionProvider"

Definition at line 26 of file constants.h.

constexpr const char* onnxruntime::kCudaExecutionProvider = "CUDAExecutionProvider"

Definition at line 27 of file constants.h.

constexpr const char* onnxruntime::kDmlExecutionProvider = "DmlExecutionProvider"

Definition at line 34 of file constants.h.

constexpr const char* onnxruntime::kDnnlExecutionProvider = "DnnlExecutionProvider"

Definition at line 28 of file constants.h.

constexpr const char* onnxruntime::kExecutionProviderSharedLibraryEntry = "provider_factory_entry_point"

Definition at line 47 of file constants.h.

constexpr const char* onnxruntime::kExecutionProviderSharedLibraryPath = "shared_lib_path"

Definition at line 46 of file constants.h.

constexpr const char* onnxruntime::kFunctionOp = "_kFunctionOp"

Definition at line 10 of file constants.h.

constexpr size_t onnxruntime::kMaxStrLen = 2048

Definition at line 276 of file common.h.

constexpr const char* onnxruntime::kMIGraphXDomain = ""

Definition at line 23 of file constants.h.

constexpr const char* onnxruntime::kMIGraphXExecutionProvider = "MIGraphXExecutionProvider"

Definition at line 35 of file constants.h.

constexpr const char* onnxruntime::kMLDomain = "ai.onnx.ml"

Definition at line 15 of file constants.h.

constexpr const char* onnxruntime::kMSDmlDomain = "com.microsoft.dml"

Definition at line 21 of file constants.h.

constexpr const char* onnxruntime::kMSDomain = "com.microsoft"

Definition at line 16 of file constants.h.

constexpr const char* onnxruntime::kMSExperimentalDomain = "com.microsoft.experimental"

Definition at line 18 of file constants.h.

constexpr const char* onnxruntime::kMSInternalNHWCDomain = "com.ms.internal.nhwc"

Definition at line 20 of file constants.h.

constexpr const char* onnxruntime::kMSNchwcDomain = "com.microsoft.nchwc"

Definition at line 19 of file constants.h.

constexpr const char* onnxruntime::kNGraphDomain = "com.intel.ai"

Definition at line 22 of file constants.h.

constexpr const char* onnxruntime::kNnapiExecutionProvider = "NnapiExecutionProvider"

Definition at line 32 of file constants.h.

constexpr const char* onnxruntime::kNoOp = "NoOp"

Definition at line 8 of file constants.h.

constexpr const char* onnxruntime::kOnnxDomain = ""

Definition at line 12 of file constants.h.

constexpr const char* onnxruntime::kOnnxDomainAlias = "ai.onnx"

Definition at line 14 of file constants.h.

constexpr const char* onnxruntime::kOpenVINOExecutionProvider = "OpenVINOExecutionProvider"

Definition at line 29 of file constants.h.

constexpr const char* onnxruntime::kPytorchAtenDomain = "org.pytorch.aten"

Definition at line 17 of file constants.h.

constexpr const char* onnxruntime::kRknpuExecutionProvider = "RknpuExecutionProvider"

Definition at line 33 of file constants.h.

constexpr const char* onnxruntime::kRocmExecutionProvider = "ROCMExecutionProvider"

Definition at line 38 of file constants.h.

constexpr const char* onnxruntime::kSnpeExecutionProvider = "SNPEExecutionProvider"

Definition at line 40 of file constants.h.

constexpr const char* onnxruntime::kTensorrtExecutionProvider = "TensorrtExecutionProvider"

Definition at line 31 of file constants.h.

constexpr size_t onnxruntime::kTensorShapeSmallBufferElementsSize = 5

Definition at line 42 of file tensor_shape.h.

constexpr const char* onnxruntime::kTvmExecutionProvider = "TvmExecutionProvider"

Definition at line 41 of file constants.h.

constexpr const char* onnxruntime::kVitisAIDomain = "com.xilinx"

Definition at line 24 of file constants.h.

constexpr const char* onnxruntime::kVitisAIExecutionProvider = "VitisAIExecutionProvider"

Definition at line 30 of file constants.h.

constexpr const char* onnxruntime::kXnnpackExecutionProvider = "XnnpackExecutionProvider"

Definition at line 42 of file constants.h.

constexpr const char* onnxruntime::OpenVINO_CPU = "OpenVINO_CPU"

Definition at line 44 of file allocator.h.

constexpr const char* onnxruntime::OpenVINO_GPU = "OpenVINO_GPU"

Definition at line 45 of file allocator.h.