SessionGetEpDeviceForInputs property

Pointer<NativeFunction<OrtStatusPtr Function(Pointer<OrtSession> session, Pointer<Pointer<OrtEpDevice>> inputs_ep_devices, Size num_inputs)>> SessionGetEpDeviceForInputs
getter/setter pair

\brief Get the OrtEpDevice (if available) for each input of the session.

An OrtEpDevice will be available if auto EP selection is enabled by calling SessionOptionsSetEpSelectionPolicy or SessionOptionsSetEpSelectionPolicyDelegate, or if the OrtEpDevice was manually added to the session using SessionOptionsAppendExecutionProvider_V2.

If an OrtEpDevice is not available for the input a nullptr is returned.

The returned OrtEpDevice can be used to create an OrtSyncStream via CreateSyncStreamForEpDevice to asynchronously provide input to the inference session Run.

The session must be fully initialized before calling this function as the assigned EPs are not known until this has occurred.

\paramin session The OrtSession instance. \paramout inputs_ep_devices Pre-allocated array of size num_inputs that will be filled with OrtEpDevice* values for each input. The order is the same as returned by SessionGetInputName. \paramin num_inputs The number of inputs in the session. Must match SessionGetInputCount.

\snippet{doc} snippets.dox OrtStatus Return Value

\since Version 1.23

Implementation

external ffi.Pointer<
  ffi.NativeFunction<
    OrtStatusPtr Function(
      ffi.Pointer<OrtSession> session,
      ffi.Pointer<ffi.Pointer<OrtEpDevice>> inputs_ep_devices,
      ffi.Size num_inputs,
    )
  >
>
SessionGetEpDeviceForInputs;