File tree Expand file tree Collapse file tree 14 files changed +90
-56
lines changed Expand file tree Collapse file tree 14 files changed +90
-56
lines changed Original file line number Diff line number Diff line change @@ -176,8 +176,8 @@ add_custom_command(
176176add_library (
177177 etdump ${CMAKE_CURRENT_SOURCE_DIR} /etdump/etdump_flatcc.cpp
178178 ${CMAKE_CURRENT_SOURCE_DIR} /etdump/emitter.cpp
179- ${CMAKE_CURRENT_SOURCE_DIR} /etdump/buffer_data_sink.cpp
180- ${CMAKE_CURRENT_SOURCE_DIR} /etdump/buffer_data_sink.h
179+ ${CMAKE_CURRENT_SOURCE_DIR} /etdump/data_sinks/ buffer_data_sink.cpp
180+ ${CMAKE_CURRENT_SOURCE_DIR} /etdump/data_sinks/ buffer_data_sink.h
181181)
182182
183183target_link_libraries (
Original file line number Diff line number Diff line change 1+ load(":targets.bzl", "define_common_targets")
2+
3+ oncall("executorch")
4+
5+ define_common_targets()
Original file line number Diff line number Diff line change 66 * LICENSE file in the root directory of this source tree.
77 */
88
9- #include < executorch/devtools/etdump/buffer_data_sink.h>
9+ #include < executorch/devtools/etdump/data_sinks/ buffer_data_sink.h>
1010#include < executorch/devtools/etdump/utils.h>
1111
1212using ::executorch::runtime::Error;
Original file line number Diff line number Diff line change 88
99#pragma once
1010
11- #include < executorch/devtools/etdump/data_sink_base.h>
11+ #include < executorch/devtools/etdump/data_sinks/ data_sink_base.h>
1212#include < executorch/runtime/core/exec_aten/exec_aten.h>
1313#include < executorch/runtime/core/span.h>
1414
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+
4+ def define_data_sink_target (data_sink_name , aten_suffix ):
5+ runtime .cxx_library (
6+ name = data_sink_name + aten_suffix ,
7+ exported_headers = [
8+ data_sink_name + ".h" ,
9+ ],
10+ srcs = [
11+ data_sink_name + ".cpp" ,
12+ ],
13+ deps = [
14+ "//executorch/devtools/etdump:utils" ,
15+ ],
16+ exported_deps = [
17+ "//executorch/runtime/core/exec_aten:lib" + aten_suffix ,
18+ ":data_sink_base" + aten_suffix ,
19+ ],
20+ visibility = [
21+ "//executorch/..." ,
22+ "@EXECUTORCH_CLIENTS" ,
23+ ],
24+ )
25+
26+ def define_common_targets ():
27+ """Defines targets that should be shared between fbcode and xplat.
28+
29+ The directory containing this targets.bzl file should also contain both
30+ TARGETS and BUCK files that call this function.
31+ """
32+ for aten_mode in (True , False ):
33+ aten_suffix = "_aten" if aten_mode else ""
34+
35+ runtime .cxx_library (
36+ name = "data_sink_base" + aten_suffix ,
37+ exported_headers = [
38+ "data_sink_base.h" ,
39+ ],
40+ exported_deps = [
41+ "//executorch/runtime/core/exec_aten/util:scalar_type_util" + aten_suffix ,
42+ ],
43+ visibility = [
44+ "//executorch/..." ,
45+ "@EXECUTORCH_CLIENTS" ,
46+ ],
47+ )
48+
49+ define_data_sink_target ("buffer_data_sink" , aten_suffix )
Original file line number Diff line number Diff line change 1+ load(":targets.bzl", "define_common_targets")
2+
3+ oncall("executorch")
4+
5+ define_common_targets()
Original file line number Diff line number Diff line change 66 * LICENSE file in the root directory of this source tree.
77 */
88
9- #include < executorch/devtools/etdump/buffer_data_sink.h>
9+ #include < executorch/devtools/etdump/data_sinks/ buffer_data_sink.h>
1010#include < executorch/runtime/core/exec_aten/testing_util/tensor_factory.h>
1111#include < executorch/runtime/core/span.h>
1212#include < executorch/runtime/platform/runtime.h>
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+
11+ runtime .cxx_test (
12+ name = "buffer_data_sink_test" ,
13+ srcs = [
14+ "buffer_data_sink_test.cpp" ,
15+ ],
16+ deps = [
17+ "//executorch/devtools/etdump/data_sinks:buffer_data_sink" ,
18+ "//executorch/runtime/core/exec_aten/testing_util:tensor_util" ,
19+ ],
20+ )
Original file line number Diff line number Diff line change 1010
1111#include < cstring>
1212
13- #include < executorch/devtools/etdump/buffer_data_sink.h>
13+ #include < executorch/devtools/etdump/data_sinks/ buffer_data_sink.h>
1414#include < executorch/devtools/etdump/emitter.h>
1515#include < executorch/devtools/etdump/etdump_schema_flatcc_builder.h>
1616#include < executorch/devtools/etdump/etdump_schema_flatcc_reader.h>
You can’t perform that action at this time.
0 commit comments