CreateExternalResourceImporterForDevice property

Pointer<NativeFunction<OrtStatusPtr Function(Pointer<OrtEpDevice> ep_device, Pointer<Pointer<OrtExternalResourceImporter>> out_importer)>> CreateExternalResourceImporterForDevice
getter/setter pair

\brief Create an external resource importer for a specific EP device.

The external resource importer is a capability object that provides methods for importing external GPU memory and semaphores for zero-copy import with an execution provider.

This is an optional EP capability. If the EP does not support external resource import, out_importer is set to nullptr and the function returns success (nullptr status). This allows callers to use the simple "if (status != nullptr) handle_error()" pattern and check out_importer separately for capability detection.

\paramin ep_device The OrtEpDevice instance to create the importer for. \paramout out_importer Output parameter set to the created OrtExternalResourceImporter instance, or nullptr if the EP does not support external resource import.

\snippet{doc} snippets.dox OrtStatus Return Value

\since Version 1.24.

Implementation

external ffi.Pointer<
  ffi.NativeFunction<
    OrtStatusPtr Function(
      ffi.Pointer<OrtEpDevice> ep_device,
      ffi.Pointer<ffi.Pointer<OrtExternalResourceImporter>> out_importer,
    )
  >
>
CreateExternalResourceImporterForDevice;