GetSupportedDevices property

Pointer<NativeFunction<OrtStatusPtr Function(Pointer<OrtEpFactory> this_ptr, Pointer<Pointer<OrtHardwareDevice>> devices, Size num_devices, Pointer<Pointer<OrtEpDevice>> ep_devices, Size max_ep_devices, Pointer<Size> num_ep_devices)>> GetSupportedDevices
getter/setter pair

\brief Get information from the execution provider about OrtHardwareDevice support.

\paramin this_ptr The OrtEpFactory instance. Non-const as the factory is passed through to the CreateEp call via the OrtEpDevice. \paramin devices The OrtHardwareDevice instances that are available. \paramin num_devices The number of OrtHardwareDevice instances. \paramout ep_devices OrtEpDevice instances for each OrtHardwareDevice that the EP can use. The implementation should call OrtEpApi::CreateEpDevice to create, and add the OrtEpDevice instances to this pre-allocated array. ORT will take ownership of the values returned. i.e. usage is ep_devices[0] = <ptr to OrtEpDevice created with OrtEpApi::CreateEpDevice>; \paramin max_ep_devices The maximum number of OrtEpDevices that can be added to ep_devices. Current default is 8. This can be increased if needed. \paramout num_ep_devices The number of EP devices added to ep_devices. \return true if the factory can create an execution provider that uses device.

\since Version 1.22.

Implementation

external ffi.Pointer<
  ffi.NativeFunction<
    OrtStatusPtr Function(
      ffi.Pointer<OrtEpFactory> this_ptr,
      ffi.Pointer<ffi.Pointer<OrtHardwareDevice>> devices,
      ffi.Size num_devices,
      ffi.Pointer<ffi.Pointer<OrtEpDevice>> ep_devices,
      ffi.Size max_ep_devices,
      ffi.Pointer<ffi.Size> num_ep_devices,
    )
  >
>
GetSupportedDevices;