forked from pytorch/executorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTARGETS
More file actions
132 lines (123 loc) · 3.35 KB
/
TARGETS
File metadata and controls
132 lines (123 loc) · 3.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# Any targets that should be shared between fbcode and xplat must be defined in
# targets.bzl. This file can contain fbcode-only targets.
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
oncall("executorch")
# TODO: this is a placeholder to support internal fbcode build. We should add the coreml backend target properly.
runtime.python_library(
name = "coreml",
visibility = [
"@EXECUTORCH_CLIENTS",
],
)
runtime.python_library(
name = "backend",
srcs = glob([
"compiler/*.py",
"logging.py",
]),
visibility = [
"@EXECUTORCH_CLIENTS",
],
deps = [
"fbsource//third-party/pypi/coremltools:coremltools",
":executorchcoreml",
"//executorch/exir/backend:backend_details",
"//executorch/exir/backend:compile_spec_schema",
],
)
runtime.python_library(
name = "partitioner",
srcs = glob([
"partition/*.py",
"logging.py",
]),
visibility = [
"@EXECUTORCH_CLIENTS",
],
deps = [
"fbsource//third-party/pypi/coremltools:coremltools",
":backend",
"//caffe2:torch",
"//executorch/exir:lib",
"//executorch/exir/backend:compile_spec_schema",
"//executorch/exir/backend:partitioner",
"//executorch/exir/backend:utils",
],
)
runtime.python_library(
name = "quantizer",
srcs = glob([
"quantizer/*.py",
]),
visibility = [
"@EXECUTORCH_CLIENTS",
],
)
runtime.python_library(
name = "recipes",
srcs = glob([
"recipes/*.py",
]),
visibility = [
"@EXECUTORCH_CLIENTS",
],
deps = [
"fbsource//third-party/pypi/coremltools:coremltools",
":backend",
"//caffe2:torch",
"//executorch/exir:lib",
"//executorch/exir/backend:compile_spec_schema",
"//executorch/exir/backend:partitioner",
"//executorch/exir/backend:utils",
"//executorch/export:lib",
],
)
runtime.cxx_python_extension(
name = "executorchcoreml",
srcs = [
"runtime/inmemoryfs/inmemory_filesystem.cpp",
"runtime/inmemoryfs/inmemory_filesystem_py.cpp",
"runtime/inmemoryfs/inmemory_filesystem_utils.cpp",
"runtime/inmemoryfs/memory_buffer.cpp",
"runtime/inmemoryfs/memory_stream.cpp",
"runtime/inmemoryfs/reversed_memory_stream.cpp",
"runtime/util/json_util.cpp",
],
headers = glob([
"runtime/inmemoryfs/**/*.hpp",
]),
base_module = "executorch.backends.apple.coreml",
compiler_flags = [
"-std=c++17",
],
preprocessor_flags = [
"-Iexecutorch/backends/apple/coreml/runtime/util",
],
types = [
"executorchcoreml.pyi",
],
visibility = [
"//executorch/examples/apple/coreml/...",
"@EXECUTORCH_CLIENTS",
],
deps = [
"fbsource//third-party/nlohmann-json:nlohmann-json",
"fbsource//third-party/pybind11:pybind11",
],
)
runtime.python_test(
name = "test",
srcs = glob([
"test/*.py",
]),
deps = [
"fbsource//third-party/pypi/coremltools:coremltools",
"fbsource//third-party/pypi/pytest:pytest",
":partitioner",
":quantizer",
":recipes",
"//caffe2:torch",
"//pytorch/vision:torchvision",
"fbsource//third-party/pypi/scikit-learn:scikit-learn",
],
)