-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[EP ABI] Initial support for kernel-based EPs #26206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
79 commits
Select commit
Hold shift + click to select a range
8c03c61
Sketch API funcs
adrianlizarraga 40d7866
Merge branch 'main' into adrianl/ep-abi-kernel-based-eps
adrianlizarraga ec46ea5
Implement more c apis
adrianlizarraga e8532a9
OpKernel class for plugin EPs
adrianlizarraga 246681c
Initialize PluginExecutionProvider's kernel registry
adrianlizarraga 6b61b91
Move files to session
adrianlizarraga 4a112fc
Add API to set kernel def I/O memory types
adrianlizarraga 0f870d0
Add C API to add type constraints to a kernel definition
adrianlizarraga 9be6923
Start implementing MemcpyFromHost kernel in example EP
adrianlizarraga 5df3fb5
Get kernel for MemcpyFromHost working for example plugin EP!
adrianlizarraga 5aade60
Moved example plugin EP's kernel stuff to different file
adrianlizarraga d159b38
Add separate utility to load OrtMLDataTypes
adrianlizarraga 8187233
Add MLDataTypes::GetTensorType()
adrianlizarraga bf92f04
Add C++ Ort::KernelDefBuilder to allow creation of macro
adrianlizarraga da14d65
Create macro for defining BuildKernelCreateInfo functions for each op
adrianlizarraga 73ae307
Move kernels to separate directory/files
adrianlizarraga fb4a6a6
Use data transfer in MemcpyFromHost and MemcpyToHost
adrianlizarraga b8867d6
Release OrtKernelCreateInfo instances if an error occurs
adrianlizarraga de8be32
Move typedef and add forward-declaration of OrtKernelImpl for gcc
adrianlizarraga dc78ec3
Merge branch 'main' into adrianl/ep-abi-kernel-based-eps
adrianlizarraga 8babb63
Apply suggestions from code review
adrianlizarraga 90bf598
Simplify with OrtKernelRegistry
adrianlizarraga 9f95589
Pass custom state to kernel creation in plugin EP
adrianlizarraga 90e4fc1
Clean up
adrianlizarraga 5f52cdc
ExampleEp: cache kernel registry in factory so it can be reused by al…
adrianlizarraga 9bfc281
Add C API to lookup a kernel from within OrtEp::GetCapability
adrianlizarraga 60ea06c
Disambiguate a compiled subgraph (of one node) from a registered kern…
adrianlizarraga 33ffd8d
Add unit test for EpGraphSupportInfo_LookUpKernel()
adrianlizarraga 31cdc82
Add missing include needed for linux ci
adrianlizarraga 93b99e6
Add KernelDef to C++ api and add basic getters
adrianlizarraga 995e25b
Add documentation comments
adrianlizarraga 0f7145f
Remove incorrect comment
adrianlizarraga f528f6f
Add missing API_IMPL_BEGIN/END macro calls
adrianlizarraga 9fbf230
Merge branch 'main' into adrianl/ep-abi-kernel-based-eps
adrianlizarraga 92d82d8
Merge main and fix conflicts
adrianlizarraga 48ebab3
Merge branch 'main' into adrianl/ep-abi-kernel-based-eps
adrianlizarraga 1d92b90
Move static PluginExecutionProvider::Create to a method on the factor…
adrianlizarraga d6404dd
Fix null return value from calling the internal kernel lookup function
adrianlizarraga 60ac6f2
Add assertion that file opened successfully
adrianlizarraga f48d6f8
Fix unused variables
adrianlizarraga 5da69e8
Fix another unused variable
adrianlizarraga 70b3434
Add new example EP that uses kernel registration
adrianlizarraga faf4260
lintrunner
adrianlizarraga 3dfa500
Merge branch 'main' into adrianl/ep-abi-kernel-based-eps
adrianlizarraga 692ec03
Remove memcpy kernels from example ep
adrianlizarraga 38d433c
Fix android compiler error due to unused field
adrianlizarraga fd20c29
Fix gsl linking for non-windows
adrianlizarraga 6aa4b50
Merge branch 'main' into adrianl/ep-abi-kernel-based-eps
adrianlizarraga 198ab0d
Add unit test that uses kernel-based EP to run a model with Squeeze a…
adrianlizarraga ea91325
Copy new example ep .so to android test directory. Ensure unit tests …
adrianlizarraga dcb6e06
Mark OrtEp::Compile() and OrtEp::ReleaseNodeComputeInfos() as optiona…
adrianlizarraga caf1274
Add C++ Ort::KernelRegistry class
adrianlizarraga d2d8f61
Update include/onnxruntime/core/session/onnxruntime_cxx_api.h
adrianlizarraga 5771cc2
Clean up kernel registration code on the EP side
adrianlizarraga a43d7d6
Clean up
adrianlizarraga 5aa4f75
Add KernelBuilder aliasing API functions. Add a relu kernel to test it.
adrianlizarraga 2ff711d
Edit test onnx model to properly test mutable alias (buffer reuse for…
adrianlizarraga d131945
Address review comments
adrianlizarraga 9d37ff8
Forgot to change return Ort::Status{nullptr} to return nullptr
adrianlizarraga 635b2b5
Merge branch 'main' into adrianl/ep-abi-kernel-based-eps
adrianlizarraga a0b5fdd
Address review comments
adrianlizarraga 24bfd53
Update lib name for files copied to Android testing dir
adrianlizarraga b0a0b84
Rename DLL in .def file
adrianlizarraga 874b54e
Address (great) review comments
adrianlizarraga 099e8f3
Correct documentation regarding the meaning of -1 for the 'end_version'.
adrianlizarraga 248c3a3
Don't include unnecessary initial struct vals
adrianlizarraga 96f9f70
Split up parameters into two parallel arrays
adrianlizarraga 250c7aa
Merge branch 'main' into adrianl/ep-abi-kernel-based-eps
adrianlizarraga 7d5627b
Add checks and more unit tests for KernelDefBuilder_SetSinceVersion
adrianlizarraga bb1fa0d
Decide to remove unused FuncManager parameter from the kernel creatio…
adrianlizarraga 7b2b6e0
Merge branch 'main' into adrianl/ep-abi-kernel-based-eps
adrianlizarraga 0913a94
Address review comments: base kernel class, auto*, data_type utils no…
adrianlizarraga b28afb3
Complete approach B
adrianlizarraga d1ef6b0
Review comments
adrianlizarraga 6ba335f
Remove noexcept from BaseKernel::DoCompute
adrianlizarraga 945d31e
Review comments
adrianlizarraga 9ebeace
Update onnxruntime/core/session/plugin_ep/ep_plugin_provider_interfac…
adrianlizarraga 4b2f9f0
Update onnxruntime/test/autoep/library/example_plugin_ep_kernel_regis…
adrianlizarraga 568c6c0
Review comments
adrianlizarraga File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.