Skip to content

Add optimized kernels to executorch pybindings #8943

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 1 commit into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion exir/backend/test/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ python_unittest(
"test_backends.py",
],
preload_deps = [
"//executorch/kernels/portable:custom_ops_generated_lib",
"//executorch/configurations:optimized_native_cpu_ops",
"//executorch/kernels/quantized:custom_ops_generated_lib",
"//executorch/runtime/executor/test:test_backend_compiler_lib",
],
Expand Down
2 changes: 1 addition & 1 deletion exir/backend/test/demos/rpc/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ python_unittest(
"test_rpc.py",
],
preload_deps = [
"//executorch/kernels/portable:custom_ops_generated_lib",
"//executorch/configurations:optimized_native_cpu_ops",
"//executorch/kernels/quantized:custom_ops_generated_lib",
# the executor backend is prebuilt and linked when building the unit test binary. When it's linked, it'll register the backend.
# It can also be loaded in PyThon runtime via torch.ops.load_library("//executorch/exir/backend/test/demos/rpc:executor_backend")
Expand Down
4 changes: 2 additions & 2 deletions exir/backend/test/demos/rpc/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def define_common_targets():
],
platforms = [ANDROID, CXX],
deps = [
"//executorch/runtime/executor:program",
"//executorch/kernels/portable:generated_lib",
"//executorch/configurations:optimized_native_cpu_ops",
"//executorch/runtime/backend:interface",
"//executorch/runtime/executor:program",
"//executorch/extension/data_loader:buffer_data_loader",
] + MODELS_ATEN_OPS_LEAN_MODE_GENERATED_LIB,
exported_deps = [
Expand Down
3 changes: 2 additions & 1 deletion shim_et/xplat/executorch/extension/pybindings/pybindings.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")

# Aten ops with portable kernel
MODELS_ATEN_OPS_LEAN_MODE_GENERATED_LIB = [
"//executorch/kernels/portable:generated_lib",
"//executorch/configurations:optimized_native_cpu_ops",
"//executorch/kernels/quantized:generated_lib",
]

Expand Down Expand Up @@ -41,6 +41,7 @@ MODELS_ATEN_OPS_ATEN_MODE_GENERATED_LIB = [

def executorch_pybindings(python_module_name, srcs = [], cppdeps = [], visibility = ["//executorch/..."], types = [], compiler_flags = []):
runtime.cxx_python_extension(
# @autodeps-skip
name = python_module_name,
srcs = [
"//executorch/extension/pybindings:pybindings.cpp",
Expand Down
Loading