Repository navigation
Expand file tree
/
Copy pathBUCK
More file actions
71 lines (67 loc) · 2.26 KB
/
Copy pathBUCK
File metadata and controls
71 lines (67 loc) · 2.26 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
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
oncall("executorch")
# TODO(T157145817): Update other flatbuffer serializers to use flatc like
# _flatbuffer.py does, and remove this.
fbcode_target(_kind = runtime.cxx_python_extension,
name = "_bindings",
srcs = [
"bindings.cpp",
],
visibility = [
"//executorch/backends/vulkan/...",
"//executorch/backends/xnnpack/...",
"//executorch/devtools/bundled_program/...",
"//executorch/devtools/etdump/...",
],
deps = [
"fbsource//third-party/flatbuffers:flatc_library",
"fbsource//third-party/pybind11:pybind11",
],
)
# Use runtime.python_library instead of the one defined in python_library.bzl,
# The .ptn format. Its own target so safetensors stays out of :lib, and therefore
# out of everything that depends on exir.
fbcode_target(_kind = runtime.python_library,
name = "ptn",
typing = True,
srcs = [
"_ptn.py",
],
visibility = ["PUBLIC"],
deps = [
"fbsource//third-party/pypi/safetensors:safetensors",
"//caffe2:torch",
],
)
# so we can have access to EXECUTORCH_CLIENTS list.
fbcode_target(_kind = runtime.python_library,
name = "lib",
srcs = [
"__init__.py",
"_cord.py",
"_dataclass.py",
"_flatbuffer.py",
"_flatbuffer_program.py",
"_named_data_store.py",
"_program.py",
"_serialize.py",
"data_serializer.py",
"padding.py",
] + glob(["generated/**/*.py"]),
resources = {
"//executorch/schema:program.fbs": "program.fbs",
"//executorch/schema:scalar_type.fbs": "scalar_type.fbs",
"fbsource//third-party/flatbuffers:flatc-host": "flatbuffers-flatc",
},
# Currently serialization API should only be used in some dedicated targets,
# to avoid ODR violation when linking with another Flatbuffers library.
# Please ask before changing this.
visibility = ["PUBLIC"],
deps = [
"fbsource//third-party/pypi/flatbuffers:flatbuffers",
"//executorch/exir:schema",
"//executorch/exir:tensor",
"//executorch/exir:tensor_layout",
],
)