Skip to content

Commit e57f21b

Browse files
jrstevensfacebook-github-bot
authored andcommitted
Buckify quantizer (#10881)
Summary: Pull Request resolved: #10881 BUCK-ify pieces as they slowly roll in from OSS Differential Revision: D73207426
1 parent 6b31d32 commit e57f21b

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

backends/nxp/TARGETS

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# @noautodeps
2+
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")
3+
load("@fbcode_macros//build_defs:python_pytest.bzl", "python_pytest")
4+
load(
5+
"@fbsource//arvr/tools/build_defs:oxx_python.bzl",
6+
"oxx_prebuilt_python_library",
7+
)
8+
9+
oncall("wrist_motion_systems")
10+
11+
12+
python_library(
13+
name = "aten_passes",
14+
srcs = glob([
15+
"aten_passes/*.py",
16+
]),
17+
deps = [
18+
"//caffe2:torch",
19+
"//executorch/exir:pass_manager",
20+
],
21+
)
22+
23+
python_library(
24+
name = "quantizer",
25+
srcs = [
26+
"quantizer/neutron_quantizer.py",
27+
"quantizer/patterns.py",
28+
"quantizer/utils.py",
29+
],
30+
deps = [
31+
":aten_passes",
32+
"//caffe2:torch",
33+
"//pytorch/ao:torchao", # @manual
34+
],
35+
)

backends/nxp/tests/TARGETS

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")
2+
load("@fbcode_macros//build_defs:python_pytest.bzl", "python_pytest")
3+
4+
oncall("wrist_motion_systems")
5+
6+
python_library(
7+
name = "models",
8+
srcs = [
9+
"models.py",
10+
],
11+
deps = [
12+
"//caffe2:torch",
13+
],
14+
)
15+
16+
python_pytest(
17+
name = "test_quantizer",
18+
srcs = [
19+
"test_quantizer.py",
20+
],
21+
deps = [
22+
"//executorch/backends/nxp:quantizer",
23+
"//caffe2:torch",
24+
"//executorch/backends/nxp/tests:models",
25+
],
26+
)

0 commit comments

Comments
 (0)