CreateMemoryInfo_V2 property
\brief Create an ::OrtMemoryInfo
\paramin name Arbitrary name.
\paramin device_type Device type.
\paramin vendor_id PCI Vendor ID. Use 0 for a generic allocator (e.g. WebGPU).
\paramin device_id Device ID if there are multiple devices of the same type. e.g. 2 GPU devices.
\paramin mem_type Memory type. Use OrtDeviceMemoryType_DEFAULT for device memory, and
OrtDeviceMemoryType_HOST_ACCESSIBLE (if applicable) for memory used to transfer between the
device and the CPU. Use the device_type and device_id of the GPU/NPU that the memory is also
accessible to.
\paramin alignment Alignment of the memory if required. Pass 0 for default alignment.
\paramin allocator_type Allocator type. If OrtAllocatorType::OrtArenaAllocator, the ORT arena will be used.
Caveat: Support for OrtArenaAllocator is currently limited to usage of internal ORT
allocators via CreateAllocator/CreateAndRegisterAllocator/CreateAndRegisterAllocatorV2.
\paramout out Newly created ::OrtMemoryInfo. Must be freed with OrtApi::ReleaseMemoryInfo
\snippet{doc} snippets.dox OrtStatus Return Value
\since Version 1.23
Implementation
external ffi.Pointer<
ffi.NativeFunction<
OrtStatusPtr Function(
ffi.Pointer<ffi.Char> name,
ffi.UnsignedInt device_type,
ffi.Uint32 vendor_id,
ffi.Int32 device_id,
ffi.UnsignedInt mem_type,
ffi.Size alignment,
ffi.Int allocator_type,
ffi.Pointer<ffi.Pointer<OrtMemoryInfo>> out,
)
>
>
CreateMemoryInfo_V2;