HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
allocator.h File Reference
#include <map>
#include "core/common/common.h"
#include "core/framework/allocator_stats.h"
#include "core/session/onnxruntime_c_api.h"
#include "core/framework/ortdevice.h"
#include "core/framework/ortmemoryinfo.h"
+ Include dependency graph for allocator.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  OrtArenaCfg
 
class  onnxruntime::IAllocator
 
class  onnxruntime::CPUAllocator
 

Namespaces

 onnxruntime
 
 onnxruntime::synchronize
 

Typedefs

using onnxruntime::WaitNotificationFn = std::function< void(Stream &, synchronize::Notification &)>
 
template<typename T >
using onnxruntime::IAllocatorUniquePtr = std::unique_ptr< T, std::function< void(T *)>>
 
using onnxruntime::AllocatorPtr = std::shared_ptr< IAllocator >
 
using onnxruntime::AllocatorMap = std::map< OrtDevice, AllocatorPtr >
 

Functions

voidonnxruntime::AllocateBufferWithOptions (IAllocator &allocator, size_t size, bool use_reserve, Stream *stream, WaitNotificationFn wait_fn)
 
voidonnxruntime::AllocatorDefaultAlloc (size_t size)
 
void onnxruntime::AllocatorDefaultFree (void *p)
 

Variables

constexpr const char * onnxruntime::CPU = "Cpu"
 
constexpr const char * onnxruntime::CUDA = "Cuda"
 
constexpr const char * onnxruntime::CUDA_PINNED = "CudaPinned"
 
constexpr const char * onnxruntime::CANN = "Cann"
 
constexpr const char * onnxruntime::CANN_PINNED = "CannPinned"
 
constexpr const char * onnxruntime::DML = "DML"
 
constexpr const char * onnxruntime::HIP = "Hip"
 
constexpr const char * onnxruntime::HIP_PINNED = "HipPinned"
 
constexpr const char * onnxruntime::OpenVINO_CPU = "OpenVINO_CPU"
 
constexpr const char * onnxruntime::OpenVINO_GPU = "OpenVINO_GPU"
 
constexpr const char * onnxruntime::WEBGPU_BUFFER = "WebGPU_Buffer"
 
constexpr size_t onnxruntime::kAllocAlignment = 256