File tree Expand file tree Collapse file tree
examples/qualcomm/oss_scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44# This source code is licensed under the BSD-style license found in the
55# LICENSE file in the root directory of this source tree.
66
7+ load ("@fbsource//tools/build_defs:fbsource_utils.bzl" , "is_fbcode" )
78load ("targets.bzl" , "define_common_targets" )
89
910oncall ("executorch" )
1011
11- define_common_targets ()
12+ define_common_targets (is_fbcode = is_fbcode () )
Load diff This file was deleted.
Original file line number Diff line number Diff line change 44# This source code is licensed under the BSD-style license found in the
55# LICENSE file in the root directory of this source tree.
66
7+ load ("@fbcode_macros//build_defs:python_unittest.bzl" , "python_unittest" )
78load ("@fbsource//xplat/executorch/build:runtime_wrapper.bzl" , "runtime" )
89load ("@fbsource//tools/build_defs:platform_defs.bzl" , "CXX" )
910
@@ -29,13 +30,24 @@ def define_operator_test_target(op):
2930 ]
3031 )
3132
32- def define_common_targets ():
33- """Defines targets that should be shared between fbcode and xplat.
34-
35- The directory containing this targets.bzl file should also contain both
36- TARGETS and BUCK files that call this function.
37- """
33+ def define_common_targets (is_fbcode = False ):
34+ """Defines targets that should be shared between fbcode and xplat."""
3835 for op in OPERATORS :
3936 define_operator_test_target (op )
4037
38+ if is_fbcode :
39+ python_unittest (
40+ name = "test_replace_quant_nodes" ,
41+ srcs = [
42+ "test_helpers_passes_utils.py" ,
43+ "test_replace_quant_nodes.py" ,
44+ ],
45+ deps = [
46+ "//pytorch/ao:torchao" , # @manual
47+ "//caffe2:torch" ,
48+ "//executorch/backends/cortex_m/passes:replace_quant_nodes_pass" ,
49+ "//executorch/backends/cortex_m/ops:ops" ,
50+ ],
51+ )
52+
4153
Original file line number Diff line number Diff line change 11# Any targets that should be shared between fbcode and xplat must be defined in
2- # targets.bzl. This file can contain xplat-only targets.
2+ # targets.bzl.
33
4+ load ("@fbsource//tools/build_defs:fbsource_utils.bzl" , "is_fbcode" )
45load (":targets.bzl" , "define_common_targets" )
56
67oncall ("executorch" )
78
8- define_common_targets ()
9+ define_common_targets (is_fbcode = is_fbcode () )
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments