diff --git a/backends/nxp/TARGETS b/backends/nxp/TARGETS index 8f59d6550b4..08c250c5c20 100644 --- a/backends/nxp/TARGETS +++ b/backends/nxp/TARGETS @@ -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( @@ -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", + ], +) diff --git a/backends/nxp/tests/TARGETS b/backends/nxp/tests/TARGETS index 4efa7f8ee56..1846423ffe9 100644 --- a/backends/nxp/tests/TARGETS +++ b/backends/nxp/tests/TARGETS @@ -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 = [ @@ -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", + ] +)