ONNX Runtime
Loading...
Searching...
No Matches
Ort::detail::EpDeviceImpl< T > Struct Template Reference

#include <onnxruntime_cxx_api.h>

Inheritance diagram for Ort::detail::EpDeviceImpl< T >:
Ort::detail::Base< T >

Public Types

using B = Ort::detail::Base< T >
 
- Public Types inherited from Ort::detail::Base< T >
using contained_type = T
 

Public Member Functions

const char * EpName () const
 
const char * EpVendor () const
 
ConstKeyValuePairs EpMetadata () const
 
ConstKeyValuePairs EpOptions () const
 
ConstHardwareDevice Device () const
 
ConstMemoryInfo GetMemoryInfo (OrtDeviceMemoryType memory_type) const
 Wraps EpDevice_MemoryInfo.
 
SyncStream CreateSyncStream (ConstKeyValuePairs stream_options={}) const
 
std::pair< uint64_t, uint64_t > GetMemoryCapacity (OrtDeviceMemoryType memory_type=OrtDeviceMemoryType_DEFAULT) const
 
uint64_t GetTotalMemoryCapacity (OrtDeviceMemoryType memory_type=OrtDeviceMemoryType_DEFAULT) const
 Total memory in bytes without querying available memory. Throws if unsupported.
 
- 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
 
constexpr contained_type & operator* () const noexcept
 
contained_type * release ()
 Relinquishes ownership of the contained C object pointer The underlying object is not destroyed.
 

Additional Inherited Members

- Protected Attributes inherited from Ort::detail::Base< T >
contained_type * p_ {}
 

Member Typedef Documentation

◆ B

template<typename T >
using Ort::detail::EpDeviceImpl< T >::B = Ort::detail::Base<T>

Member Function Documentation

◆ CreateSyncStream()

template<typename T >
SyncStream Ort::detail::EpDeviceImpl< T >::CreateSyncStream ( ConstKeyValuePairs  stream_options = {}) const

◆ Device()

template<typename T >
ConstHardwareDevice Ort::detail::EpDeviceImpl< T >::Device ( ) const

◆ EpMetadata()

template<typename T >
ConstKeyValuePairs Ort::detail::EpDeviceImpl< T >::EpMetadata ( ) const

◆ EpName()

template<typename T >
const char * Ort::detail::EpDeviceImpl< T >::EpName ( ) const

◆ EpOptions()

template<typename T >
ConstKeyValuePairs Ort::detail::EpDeviceImpl< T >::EpOptions ( ) const

◆ EpVendor()

template<typename T >
const char * Ort::detail::EpDeviceImpl< T >::EpVendor ( ) const

◆ GetMemoryCapacity()

template<typename T >
std::pair< uint64_t, uint64_t > Ort::detail::EpDeviceImpl< T >::GetMemoryCapacity ( OrtDeviceMemoryType  memory_type = OrtDeviceMemoryType_DEFAULT) const

Wraps EpDevice_CreateSyncStream Returns {total, available} memory in bytes for the selected memory type. Throws if unsupported. Querying available memory may initialize provider resources and can be slow (e.g. CUDA may create and destroy the device's primary context on each call if nothing else retains it). Prefer GetTotalMemoryCapacity() when only the total is needed. See OrtApi::EpDevice_GetMemoryCapacity.

◆ GetMemoryInfo()

template<typename T >
ConstMemoryInfo Ort::detail::EpDeviceImpl< T >::GetMemoryInfo ( OrtDeviceMemoryType  memory_type) const

Wraps EpDevice_MemoryInfo.

◆ GetTotalMemoryCapacity()

template<typename T >
uint64_t Ort::detail::EpDeviceImpl< T >::GetTotalMemoryCapacity ( OrtDeviceMemoryType  memory_type = OrtDeviceMemoryType_DEFAULT) const

Total memory in bytes without querying available memory. Throws if unsupported.