File tree Expand file tree Collapse file tree 5 files changed +24
-5
lines changed
shim_et/xplat/executorch/codegen Expand file tree Collapse file tree 5 files changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ BUILDABLE_KERNELS_PRIM_OPS_TARGETS=$(buck2 query //kernels/prim_ops/... | grep -
24
24
# TODO: expand the covered scope of Buck targets.
25
25
# //runtime/kernel/... is failing because //third-party:torchgen_files's shell script can't find python on PATH.
26
26
# //runtime/test/... requires Python torch, which we don't have in our OSS buck setup.
27
- buck2 test $BUILDABLE_OPTIMIZED_OPS //kernels/portable/... \
27
+ buck2 test \
28
+ //examples/selective_build:select_all_dtype_selective_lib_portable_lib \
29
+ $BUILDABLE_OPTIMIZED_OPS //kernels/portable/... \
28
30
$BUILDABLE_KERNELS_PRIM_OPS_TARGETS //runtime/backend/... //runtime/core/... \
29
31
//runtime/executor: //runtime/kernel/... //runtime/platform/...
Original file line number Diff line number Diff line change @@ -25,6 +25,21 @@ def define_common_targets():
25
25
],
26
26
)
27
27
28
+ executorch_generated_lib (
29
+ name = "select_all_dtype_selective_lib" ,
30
+ functions_yaml_target = "//executorch/kernels/portable:functions.yaml" ,
31
+ kernel_deps = [
32
+ "//executorch/kernels/portable:operators" ,
33
+ ],
34
+ # Setting dtype_selective_build without using list or dict selection isn't a
35
+ # typical use case; we just do it here so that we can test that our mechanism
36
+ # for getting buck deps right for dtype_selective_build is working.
37
+ dtype_selective_build = True ,
38
+ deps = [
39
+ ":select_all_ops" ,
40
+ ],
41
+ )
42
+
28
43
# Select a list of operators: defined in `ops`
29
44
et_operator_library (
30
45
name = "select_ops_in_list" ,
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ def define_common_targets():
11
11
# build, where the portable ops are built from source and linked with :all_deps
12
12
runtime .cxx_library (
13
13
name = "all_deps" ,
14
- deps = [
14
+ exported_deps = [
15
15
"//executorch/kernels/portable/cpu/pattern:pattern" ,
16
16
"//executorch/kernels/portable/cpu/pattern:bitwise_op" ,
17
17
"//executorch/kernels/portable/cpu/pattern:comparison_op" ,
@@ -54,14 +54,16 @@ def define_common_targets():
54
54
"unary_ufunc_realhbbf16_to_floathbf16.cpp" ,
55
55
"unary_ufunc_realh.cpp" ,
56
56
],
57
+ exported_deps = [
58
+ "//executorch/runtime/kernel:kernel_includes" ,
59
+ ],
57
60
exported_headers = [
58
61
"pattern.h" ,
59
62
],
60
63
compiler_flags = ["-Wno-missing-prototypes" ],
61
64
deps = [
62
65
"//executorch/kernels/portable/cpu/util:broadcast_util" ,
63
66
"//executorch/kernels/portable/cpu/util:functional_util" ,
64
- "//executorch/runtime/kernel:kernel_includes" ,
65
67
],
66
68
visibility = ["//executorch/kernels/portable/cpu/..." , "//executorch/kernels/optimized/cpu/..." ],
67
69
)
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ def define_common_targets():
11
11
# build, where the portable ops are built from source and linked with :all_deps
12
12
runtime .cxx_library (
13
13
name = "all_deps" ,
14
- deps = [
14
+ exported_deps = [
15
15
"//executorch/kernels/portable/cpu/util:functional_util" ,
16
16
"//executorch/kernels/portable/cpu/util:broadcast_util" ,
17
17
"//executorch/kernels/portable/cpu/util:kernel_ops_util" ,
Original file line number Diff line number Diff line change @@ -631,7 +631,7 @@ def executorch_generated_lib(
631
631
)
632
632
633
633
portable_lib = []
634
- if dtype_selective_build and is_xplat () and "//executorch/kernels/portable:operators" in kernel_deps :
634
+ if dtype_selective_build and ( is_xplat () or runtime . is_oss ) and "//executorch/kernels/portable:operators" in kernel_deps :
635
635
# Remove portable from kernel_deps as we're building it from source.
636
636
kernel_deps .remove ("//executorch/kernels/portable:operators" )
637
637
You can’t perform that action at this time.
0 commit comments