SessionGetEpDeviceForOutputs property

Pointer<NativeFunction<OrtStatusPtr Function(Pointer<OrtSession> session, Pointer<Pointer<OrtEpDevice>> outputs_ep_devices, Size num_outputs)>> SessionGetEpDeviceForOutputs
getter/setter pair

\brief Get the EP device assigned to each session output.

Returns the OrtEpDevice assigned to each output of the session after graph partitioning. This allows validation that outputs are placed on the expected device for external resource sharing.

The EP device for each output is determined by which execution provider will produce that output during inferencing. This information is useful for:

  • Validating that outputs will be placed on the expected device for external resource sharing
  • Deciding whether to use external memory handles for outputs

\paramin session The OrtSession instance to query. \paramout outputs_ep_devices An array to be filled with the EP device for each output. The array must be allocated by the caller with space for OrtEpDevice* values for each output. The order is the same as returned by SessionGetOutputName. \paramin num_outputs The number of outputs in the session. Must match SessionGetOutputCount.

\snippet{doc} snippets.dox OrtStatus Return Value

\since Version 1.24

Implementation

external ffi.Pointer<
  ffi.NativeFunction<
    OrtStatusPtr Function(
      ffi.Pointer<OrtSession> session,
      ffi.Pointer<ffi.Pointer<OrtEpDevice>> outputs_ep_devices,
      ffi.Size num_outputs,
    )
  >
>
SessionGetEpDeviceForOutputs;