Python runtime API for operators #10726
Labels
module: runtime
Issues related to the core runtime and code under runtime/
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
🚀 The feature, motivation and pitch
Goal
Allow users to directly call kernels (potentially delegates) in python runtime. Supports dynamic kernel registration/deregistration, kernel metadata (op schema, selected dtype/dim order) inspection.
Motivation
Simplify kernel development workflow.
Leverage existing PyTorch op unit test framework for kernel coverage.
Microbenchmarks for kernels.
API
Dynamically register a custom kernel
Task Breakdown
OperatorRegistry
andKernel
. ForKernel
pybind, it should expose anoperator()
in python, that takes in a list of arguments and inside the pybind implementation we wrap them with EValues and call the kernel.Kernel
withEdgeOpOverload
.EdgeOpOverload
is an AOT operator concept and if we call it directly it will trigger the ATen kernel. Add another API inEdgeOpOverload
so that it can call theKernel
in ET.Alternatives
No response
Additional context
No response
RFC (Optional)
No response
cc @JacobSzwejbka @lucylq
The text was updated successfully, but these errors were encountered: