CreateMemoryInfo_V2 property

Pointer<NativeFunction<OrtStatusPtr Function(Pointer<Char> name, UnsignedInt device_type, Uint32 vendor_id, Int32 device_id, UnsignedInt mem_type, Size alignment, Int allocator_type, Pointer<Pointer<OrtMemoryInfo>> out)>> CreateMemoryInfo_V2
getter/setter pair

\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;