File tree Expand file tree Collapse file tree 2 files changed +55
-1
lines changed Expand file tree Collapse file tree 2 files changed +55
-1
lines changed Original file line number Diff line number Diff line change 1- # @noautodeps
21load("@fbcode_macros//build_defs:python_library.bzl", "python_library")
32load("@fbcode_macros//build_defs:python_pytest.bzl", "python_pytest")
43load(
@@ -33,3 +32,32 @@ python_library(
3332 "//pytorch/ao:torchao", # @manual
3433 ],
3534)
35+
36+ python_library(
37+ name = "neutron_sdk",
38+ srcs = glob(["backend/**/*.py"]),
39+ deps = [
40+ "fbsource//third-party/pypi/neutron_convertor_SDK_25_03:neutron_convertor_SDK_25_03",
41+ ],
42+ )
43+
44+ python_library(
45+ name = "neutron_backend",
46+ srcs = [
47+ "nxp_backend.py",
48+ "neutron_partitioner.py",
49+ "neutron_node_extraction.py",
50+ "neutron_pass_manager.py",
51+ ],
52+ deps = [
53+ ":neutron_sdk",
54+ ":aten_passes",
55+ ":quantizer",
56+ "fbsource//third-party/pypi/flatbuffers:flatbuffers",
57+ "fbsource//third-party/pypi/ml-dtypes:ml-dtypes",
58+ "fbsource//third-party/tosa_tools/v0.80/serialization_lib/python/serializer:serializer",
59+ "//executorch/exir:lib",
60+ "//executorch/backends/transforms:remove_getitem_op",
61+ "//caffe2:torch",
62+ ],
63+ )
Original file line number Diff line number Diff line change @@ -13,6 +13,20 @@ python_library(
1313 ],
1414)
1515
16+ python_library(
17+ name = "executorch_pipeline",
18+ srcs = [
19+ "executorch_pipeline.py",
20+ "executors.py",
21+ ],
22+ deps = [
23+ "//executorch/exir:lib",
24+ "//pytorch/ao:torchao",
25+ "//executorch/backends/nxp:quantizer",
26+ "//executorch/backends/nxp:neutron_backend",
27+ ]
28+ )
29+
1630python_pytest(
1731 name = "test_quantizer",
1832 srcs = [
@@ -24,3 +38,15 @@ python_pytest(
2438 "//executorch/backends/nxp/tests:models",
2539 ],
2640)
41+
42+ python_pytest(
43+ name = "test_neutron_backend",
44+ srcs = [
45+ "test_neutron_backend.py",
46+ ],
47+ deps = [
48+ "//executorch/backends/nxp:neutron_backend",
49+ ":executorch_pipeline",
50+ ":models",
51+ ]
52+ )
You can’t perform that action at this time.
0 commit comments