Skip to content

Pybindings Module is more flexible with non_const set ups #109

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

Closed
wants to merge 3 commits into from
Closed
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/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def forward(self, x):
def test_backend_with_compiler_out_of_range(self, extract_segments: bool):
with self.assertRaisesRegex(
RuntimeError,
"initializing executor for method forward failed with error 0x:12",
"loading method forward failed with error 0x12",
):
self.run_model_in_unsupported_backend(extract_segments=extract_segments)

Expand Down
2 changes: 1 addition & 1 deletion exir/backend/test/test_backends_lifted.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def forward(self, x):
def test_backend_with_compiler_out_of_range(self, extract_segments: bool):
with self.assertRaisesRegex(
RuntimeError,
"initializing executor for method forward failed with error 0x:12",
"loading method forward failed with error 0x12",
):
self.run_model_in_unsupported_backend(extract_segments=extract_segments)

Expand Down
21 changes: 4 additions & 17 deletions extension/pybindings/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Any targets that should be shared between fbcode and xplat must be defined in
# targets.bzl. This file can contain fbcode-only targets.

load("@fbcode//executorch/extension/pybindings:targets.bzl", "MODELS_ATEN_OPS_ATEN_MODE_GENERATED_LIB", "MODELS_ATEN_OPS_LEAN_MODE_GENERATED_LIB", "MODULE_DEPS", "define_common_targets", "executorch_pybindings")
load("@fbcode//executorch/extension/pybindings:targets.bzl", "ATEN_MODULE_DEPS", "MODELS_ATEN_OPS_ATEN_MODE_GENERATED_LIB", "MODELS_ATEN_OPS_LEAN_MODE_GENERATED_LIB", "PORTABLE_MODULE_DEPS", "define_common_targets", "executorch_pybindings")
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")

define_common_targets()
Expand All @@ -11,7 +11,7 @@ executorch_pybindings(
srcs = [
"module.cpp",
],
cppdeps = MODULE_DEPS,
cppdeps = PORTABLE_MODULE_DEPS,
python_module_name = "core",
visibility = ["PUBLIC"],
)
Expand All @@ -20,7 +20,7 @@ executorch_pybindings(
srcs = [
"module.cpp",
],
cppdeps = MODULE_DEPS + MODELS_ATEN_OPS_LEAN_MODE_GENERATED_LIB,
cppdeps = PORTABLE_MODULE_DEPS + MODELS_ATEN_OPS_LEAN_MODE_GENERATED_LIB,
python_module_name = "portable",
visibility = ["PUBLIC"],
)
Expand All @@ -29,20 +29,7 @@ executorch_pybindings(
srcs = [
"module.cpp",
],
cppdeps = [
"//executorch/runtime/kernel:operator_registry",
"//executorch/runtime/executor:executor_aten",
"//executorch/runtime/core/exec_aten:lib",
"//executorch/schema:bundled_program_schema",
"//executorch/schema:program",
"//executorch/extension/data_loader:buffer_data_loader",
"//executorch/extension/data_loader:mmap_data_loader",
"//executorch/util:read_file",
"//executorch/util:test_memory_config",
"//executorch/util:bundled_program_verification_aten",
"//caffe2:torch-cpp",
"//executorch/runtime/executor/test:test_backend_compiler_lib_aten",
] + MODELS_ATEN_OPS_ATEN_MODE_GENERATED_LIB,
cppdeps = ATEN_MODULE_DEPS + MODELS_ATEN_OPS_ATEN_MODE_GENERATED_LIB,
python_module_name = "aten_mode_lib",
visibility = ["PUBLIC"],
)
Expand Down
Loading