Skip to content
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
30 changes: 29 additions & 1 deletion backends/nxp/TARGETS
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# @noautodeps
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")
load("@fbcode_macros//build_defs:python_pytest.bzl", "python_pytest")
load(
Expand Down Expand Up @@ -33,3 +32,32 @@ python_library(
"//pytorch/ao:torchao", # @manual
],
)

python_library(
name = "neutron_sdk",
srcs = glob(["backend/**/*.py"]),
deps = [
"fbsource//third-party/pypi/neutron_convertor_SDK_25_03:neutron_convertor_SDK_25_03",
],
)

python_library(
name = "neutron_backend",
srcs = [
"nxp_backend.py",
"neutron_partitioner.py",
"neutron_node_extraction.py",
"neutron_pass_manager.py",
],
deps = [
":neutron_sdk",
":aten_passes",
":quantizer",
"fbsource//third-party/pypi/flatbuffers:flatbuffers",
"fbsource//third-party/pypi/ml-dtypes:ml-dtypes",
"fbsource//third-party/tosa_tools/v0.80/serialization_lib/python/serializer:serializer",
"//executorch/exir:lib",
"//executorch/backends/transforms:remove_getitem_op",
"//caffe2:torch",
],
)
26 changes: 26 additions & 0 deletions backends/nxp/tests/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ python_library(
],
)

python_library(
name = "executorch_pipeline",
srcs = [
"executorch_pipeline.py",
"executors.py",
],
deps = [
"//executorch/exir:lib",
"//pytorch/ao:torchao",
"//executorch/backends/nxp:quantizer",
"//executorch/backends/nxp:neutron_backend",
]
)

python_pytest(
name = "test_quantizer",
srcs = [
Expand All @@ -24,3 +38,15 @@ python_pytest(
"//executorch/backends/nxp/tests:models",
],
)

python_pytest(
name = "test_neutron_backend",
srcs = [
"test_neutron_backend.py",
],
deps = [
"//executorch/backends/nxp:neutron_backend",
":executorch_pipeline",
":models",
]
)
Loading