Skip to content

Conversation

@adrianlizarraga
Copy link
Contributor

@adrianlizarraga adrianlizarraga commented Dec 15, 2025

Description

Adds new OrtKernelInfo APIs to enable plugin EP kernel implementations to retrieve operator metadata and access the parent EP instance.

  • Added four new KernelInfo APIs: KernelInfo_GetOperatorDomain(), KernelInfo_GetOperatorType(), KernelInfo_GetOperatorSinceVersion(), and KernelInfo_GetEp()
  • Extended example plugin EP to demonstrate accessing EP configuration from kernel implementations.

Motivation and Context

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

onnxruntime/test/autoep/library/example_plugin_ep_kernel_registry/kernels/binary_op.cc:38

  • Typo in the comment. The word 'implementations' should be singular 'implementation' when preceded by 'an actual' to maintain grammatical correctness.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@adrianlizarraga adrianlizarraga marked this pull request as ready for review December 30, 2025 22:57
fs-eire
fs-eire previously approved these changes Jan 4, 2026
Copy link
Contributor

@fs-eire fs-eire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for the added APIs.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (2)

onnxruntime/test/autoep/library/example_plugin_ep_kernel_registry/kernels/binary_op.cc:136

  • The comment says "pre-pack mul initializers" but this kernel now handles both Mul and Add operators. The comment should be updated to say "pre-pack initializers" or "pre-pack mul/add initializers".
    onnxruntime/test/autoep/library/example_plugin_ep_kernel_registry/kernels/binary_op.cc:163
  • This cast assumes GetEp() returns a valid ExampleKernelEp pointer without any type checking. If GetEp() returns a different plugin EP type (unlikely in this test scenario but possible in general usage), this cast would be unsafe and could lead to undefined behavior. Consider adding a safety check or documentation that this kernel implementation is only compatible with ExampleKernelEp.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 25 out of 25 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

onnxruntime/test/autoep/library/example_plugin_ep_kernel_registry/kernels/binary_op.cc:54

  • The ONNX domain is represented as an empty string (""), not "ai.onnx". The condition op_domain != "ai.onnx" will always evaluate to true for ONNX operators (which have domain ""), causing the validation to incorrectly reject valid Mul and Sub operators from the ONNX domain. This should be checking against an empty string instead.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@adrianlizarraga adrianlizarraga enabled auto-merge (squash) January 6, 2026 22:12
@adrianlizarraga adrianlizarraga merged commit 27e6002 into main Jan 7, 2026
97 checks passed
@adrianlizarraga adrianlizarraga deleted the adrianl/KernelPluginEp_KernelInfoApis branch January 7, 2026 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants