File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed
shim_et/xplat/executorch/codegen Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,9 @@ BUILDABLE_KERNELS_PRIM_OPS_TARGETS=$(buck2 query //kernels/prim_ops/... | grep -
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
27
for op in " build" " test" ; do
28
- buck2 $op $BUILDABLE_OPTIMIZED_OPS //kernels/portable/... \
28
+ buck2 $op $BUILDABLE_OPTIMIZED_OPS \
29
+ //examples/selective_build:select_all_dtype_selective_lib_portable_lib \
30
+ //kernels/portable/... \
29
31
$BUILDABLE_KERNELS_PRIM_OPS_TARGETS //runtime/backend/... //runtime/core/... \
30
32
//runtime/executor: //runtime/kernel/... //runtime/platform/...
31
33
done
Original file line number Diff line number Diff line change @@ -25,6 +25,22 @@ def define_common_targets():
25
25
],
26
26
)
27
27
28
+ if runtime .is_oss or is_xplat ():
29
+ executorch_generated_lib (
30
+ name = "select_all_dtype_selective_lib" ,
31
+ functions_yaml_target = "//executorch/kernels/portable:functions.yaml" ,
32
+ kernel_deps = [
33
+ "//executorch/kernels/portable:operators" ,
34
+ ],
35
+ # Setting dtype_selective_build without using list or dict selection isn't a
36
+ # typical use case; we just do it here so that we can test that our mechanism
37
+ # for getting buck deps right for dtype_selective_build is working.
38
+ dtype_selective_build = True ,
39
+ deps = [
40
+ ":select_all_ops" ,
41
+ ],
42
+ )
43
+
28
44
# Select a list of operators: defined in `ops`
29
45
et_operator_library (
30
46
name = "select_ops_in_list" ,
Original file line number Diff line number Diff line change @@ -752,7 +752,7 @@ def executorch_generated_lib(
752
752
See: https://www.internalfb.com/wiki/PyTorch/Teams/Edge/PyTorch_Edge_Core_Team/Dtype_Selective_Build/""" )
753
753
754
754
if dtype_selective_build :
755
- if not expose_operator_symbols and not is_xplat ():
755
+ if not expose_operator_symbols and not ( is_xplat () or runtime . is_oss ):
756
756
fail ("""
757
757
Dtype selective build with expose_operator_symbols=False works only in xplat -
758
758
there are undefined symbols otherwise. Please try to use xplat, or talk to the
You can’t perform that action at this time.
0 commit comments