Skip to content

[Feature Request] Expose API to query supported copies for EPs #29602

Description

@bbernhar

Describe the feature request

When integrating ORT via the interop API, we need to determine how to handle CPU read/write ops for tensors after session initialization. While host-accessible memory can be queried statically ahead of time (via EpDevice_MemoryInfo or SessionGetMemoryInfoForInputs checking for HOST_ACCESSIBLE), device-only tensors requires a memory transfer.

Currently, there is no public query to determine which copy directions an EP supports. The CanCopy capability seems to be internal to ORT.

Since we cannot statically query copy support, we are forced to probe the EP by attempting a CopyTensors operation at startup or fallback to a slower alternative (such as using a single identity-op graph to force outputs to the CPU EP).

We are requesting a structured, public query to check supported copy directions for a given EP. This would eliminate the need for trial-and-error probing or fallbacks.

Describe scenario use case

To route device-only tensors imported from the ORT interop API (since version 1.24), WebNN currently relies on a dummy CopyTensors call to test EP support. A public query API would eliminate this trial-and-error, allowing us to instantly configure either standard transfers or the fallback identity-op graph upfront.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ep:WebNNWebNN execution providerfeature requestrequest for unsupported feature or enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions