EpDevice_AddAllocatorInfo property

Pointer<NativeFunction<OrtStatusPtr Function(Pointer<OrtEpDevice> ep_device, Pointer<OrtMemoryInfo> allocator_memory_info)>> EpDevice_AddAllocatorInfo
getter/setter pair

\brief Register an allocator with the OrtEpDevice.

This allows an EP to provide OrtMemoryInfo for DEFAULT and HOST_ACCESSIBLE memory type as needed. The registered values will be used in calls to OrtEpFactory::CreateAllocator to ensure the required allocator/s are available for EP usage.

Multiple calls for the same entry type will replace a previous entry.

Available entries:

  • OrtDeviceAllocator with type of OrtDeviceMemoryType_DEFAULT
  • OrtDeviceAllocator with type of OrtDeviceMemoryType_HOST_ACCESSIBLE
  • OrtReadOnlyAllocator with type of OrtDeviceMemoryType_DEFAULT
  • if provided this allocator will only be used to copy initializers to the device the EP uses. ORT will use the OrtDeviceAllocator if not provided.

\paramin ep_device The OrtEpDevice instance to register the OrtMemoryInfo with. \paramin allocator_memory_info The OrtMemoryInfo information for the allocator.

\snippet{doc} snippets.dox OrtStatus Return Value

\since Version 1.23.

Implementation

external ffi.Pointer<
  ffi.NativeFunction<
    OrtStatusPtr Function(
      ffi.Pointer<OrtEpDevice> ep_device,
      ffi.Pointer<OrtMemoryInfo> allocator_memory_info,
    )
  >
>
EpDevice_AddAllocatorInfo;