File tree Expand file tree Collapse file tree 12 files changed +59
-30
lines changed
apple/mps/executor_runner
shim/xplat/executorch/extension/pybindings Expand file tree Collapse file tree 12 files changed +59
-30
lines changed Original file line number Diff line number Diff line change 27
27
#include < executorch/runtime/platform/profiler.h>
28
28
#include < executorch/runtime/platform/runtime.h>
29
29
#include < executorch/util/util.h>
30
- #include < executorch/util/bundled_program_verification .h>
30
+ #include < executorch/sdk/bundled_program/bundled_program .h>
31
31
#include < executorch/extension/data_loader/buffer_data_loader.h>
32
32
#include < executorch/runtime/core/result.h>
33
33
#include < executorch/runtime/platform/runtime.h>
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ def define_common_targets():
20
20
"//executorch/extension/data_loader:file_data_loader" ,
21
21
"//executorch/extension/data_loader:buffer_data_loader" ,
22
22
"//executorch/util:util" ,
23
- "//executorch/util:bundled_program_verification " ,
23
+ "//executorch/sdk/bundled_program:runtime " ,
24
24
"//executorch/util:util" ,
25
25
],
26
26
define_static_target = True ,
Original file line number Diff line number Diff line change 27
27
#include < executorch/runtime/executor/program.h>
28
28
#include < executorch/runtime/platform/log.h>
29
29
#include < executorch/runtime/platform/runtime.h>
30
+ #include < executorch/sdk/bundled_program/bundled_program.h>
30
31
#include < executorch/sdk/etdump/etdump_flatcc.h>
31
- #include < executorch/util/bundled_program_verification.h>
32
32
#include < executorch/util/util.h>
33
33
34
34
static uint8_t method_allocator_pool[4 * 1024U * 1024U ]; // 4MB
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ def define_common_targets():
20
20
"//executorch/extension/data_loader:file_data_loader" ,
21
21
"//executorch/extension/data_loader:buffer_data_loader" ,
22
22
"//executorch/util:util" ,
23
- "//executorch/util:bundled_program_verification" ,
24
23
"//executorch/sdk/etdump:etdump_flatcc" ,
24
+ "//executorch/sdk/bundled_program:runtime" ,
25
25
],
26
26
external_deps = [
27
27
"gflags" ,
Original file line number Diff line number Diff line change 26
26
#include < executorch/runtime/platform/profiler.h>
27
27
#include < executorch/runtime/platform/runtime.h>
28
28
#include < executorch/schema/bundled_program_schema_generated.h>
29
- #include < executorch/util/bundled_program_verification .h>
29
+ #include < executorch/sdk/bundled_program/bundled_program .h>
30
30
#include < executorch/util/read_file.h>
31
31
32
32
#include < ATen/Functions.h>
Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ def define_common_targets():
95
95
# Lock this down as tightly as possible to ensure that flatbuffers
96
96
# are an implementation detail. Ideally this list would only include
97
97
# //executorch/runtime/executor/...
98
+ "//executorch/bundled_program/runtime/..." ,
98
99
"//executorch/codegen/tools/..." ,
99
100
"//executorch/runtime/executor/..." ,
100
101
],
Original file line number Diff line number Diff line change 1
- load("@fbcode_macros//build_defs:python_library.bzl", "python_library")
1
+ load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
2
+ load(":targets.bzl", "define_common_targets")
2
3
3
4
oncall("executorch")
4
5
5
- python_library(
6
+ define_common_targets()
7
+
8
+ runtime.python_library(
6
9
name = "core",
7
10
srcs = [
8
11
"core.py",
9
12
],
13
+ visibility = [
14
+ "//executorch/...",
15
+ "@EXECUTORCH_CLIENTS",
16
+ ],
10
17
deps = [
11
18
":config",
12
19
":schema",
@@ -18,30 +25,40 @@ python_library(
18
25
],
19
26
)
20
27
21
- python_library(
28
+ runtime. python_library(
22
29
name = "config",
23
30
srcs = [
24
31
"config.py",
25
32
],
33
+ visibility = [
34
+ "//executorch/...",
35
+ "@EXECUTORCH_CLIENTS",
36
+ ],
26
37
deps = [
27
38
"fbsource//third-party/pypi/typing-extensions:typing-extensions",
28
39
"//caffe2:torch",
29
40
],
30
41
)
31
42
32
- python_library(
43
+ runtime. python_library(
33
44
name = "schema",
34
45
srcs = [
35
46
"schema.py",
36
47
],
48
+ visibility = [
49
+ "//executorch/sdk/...",
50
+ ],
37
51
deps = [
38
52
"//executorch/exir:scalar_type",
39
53
],
40
54
)
41
55
42
- python_library(
56
+ runtime. python_library(
43
57
name = "version",
44
58
srcs = [
45
59
"version.py",
46
60
],
61
+ visibility = [
62
+ "//executorch/sdk/...",
63
+ ],
47
64
)
Original file line number Diff line number Diff line change 6
6
* LICENSE file in the root directory of this source tree.
7
7
*/
8
8
9
- #include < executorch/util/bundled_program_verification .h>
9
+ #include < executorch/sdk/bundled_program/bundled_program .h>
10
10
11
11
#include < cmath>
12
12
#include < cstddef>
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ load ("@fbsource//xplat/executorch/build:runtime_wrapper.bzl" , "runtime" )
2
+
3
+ def define_common_targets ():
4
+ """Defines targets that should be shared between fbcode and xplat.
5
+
6
+ The directory containing this targets.bzl file should also contain both
7
+ TARGETS and BUCK files that call this function.
8
+ """
9
+
10
+ for aten_mode in (True , False ):
11
+ aten_suffix = ("_aten" if aten_mode else "" )
12
+ runtime .cxx_library (
13
+ name = "runtime" + aten_suffix ,
14
+ srcs = ["bundled_program.cpp" ],
15
+ exported_headers = ["bundled_program.h" ],
16
+ visibility = [
17
+ "//executorch/..." ,
18
+ "@EXECUTORCH_CLIENTS" ,
19
+ ],
20
+ deps = [
21
+ "//executorch/runtime/core/exec_aten/util:dim_order_util" + aten_suffix ,
22
+ "//executorch/schema:bundled_program_schema" ,
23
+ ],
24
+ exported_deps = [
25
+ "//executorch/runtime/core:memory_allocator" ,
26
+ "//executorch/runtime/executor:program" + aten_suffix ,
27
+ ],
28
+ )
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ PORTABLE_MODULE_DEPS = [
14
14
"//executorch/runtime/executor:program" ,
15
15
"//executorch/schema:bundled_program_schema" ,
16
16
"//executorch/extension/aten_util:aten_bridge" ,
17
- "//executorch/util:bundled_program_verification " ,
17
+ "//executorch/sdk/bundled_program:runtime " ,
18
18
"//executorch/extension/data_loader:buffer_data_loader" ,
19
19
"//executorch/extension/data_loader:mmap_data_loader" ,
20
20
"//executorch/extension/memory_allocator:malloc_memory_allocator" ,
@@ -31,7 +31,7 @@ ATEN_MODULE_DEPS = [
31
31
"//executorch/extension/data_loader:mmap_data_loader" ,
32
32
"//executorch/extension/memory_allocator:malloc_memory_allocator" ,
33
33
"//executorch/util:read_file" ,
34
- "//executorch/util:bundled_program_verification_aten " ,
34
+ "//executorch/sdk/bundled_program:runtime_aten " ,
35
35
"//caffe2:torch" ,
36
36
"//caffe2:torch_extension" ,
37
37
"//caffe2:ATen" ,
Original file line number Diff line number Diff line change @@ -23,23 +23,6 @@ def define_common_targets():
23
23
24
24
for aten_mode in (True , False ):
25
25
aten_suffix = ("_aten" if aten_mode else "" )
26
- runtime .cxx_library (
27
- name = "bundled_program_verification" + aten_suffix ,
28
- srcs = ["bundled_program_verification.cpp" ],
29
- exported_headers = ["bundled_program_verification.h" ],
30
- visibility = [
31
- "//executorch/..." ,
32
- "@EXECUTORCH_CLIENTS" ,
33
- ],
34
- deps = [
35
- "//executorch/runtime/core/exec_aten/util:dim_order_util" + aten_suffix ,
36
- "//executorch/schema:bundled_program_schema" ,
37
- ],
38
- exported_deps = [
39
- "//executorch/runtime/core:memory_allocator" ,
40
- "//executorch/runtime/executor:program" + aten_suffix ,
41
- ],
42
- )
43
26
44
27
runtime .cxx_library (
45
28
name = "util" + aten_suffix ,
You can’t perform that action at this time.
0 commit comments