Skip to content

Commit 7ba2f25

Browse files
committed
Reapply "Add (and fix) OSS check that et_operator_library dtype_selective_build builds (#9245)"
This was reverted due to internal CI failure; reapplying with that fixed (the new Buck target needed to be moved). Original summary: This wasn't checked, and it's easy to forget to update the all_deps targets if we don't check. Now we check. Differential Revision: [D76458040](https://our.internmc.facebook.com/intern/diff/D76458040/) ghstack-source-id: 289775426 Pull Request resolved: #11573
1 parent 2dda7a2 commit 7ba2f25

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.ci/scripts/unittest-buck2.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ BUILDABLE_KERNELS_PRIM_OPS_TARGETS=$(buck2 query //kernels/prim_ops/... | grep -
2525
# //runtime/kernel/... is failing because //third-party:torchgen_files's shell script can't find python on PATH.
2626
# //runtime/test/... requires Python torch, which we don't have in our OSS buck setup.
2727
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/... \
2931
$BUILDABLE_KERNELS_PRIM_OPS_TARGETS //runtime/backend/... //runtime/core/... \
3032
//runtime/executor: //runtime/kernel/... //runtime/platform/...
3133
done

shim_et/xplat/executorch/codegen/codegen.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ def executorch_generated_lib(
752752
See: https://www.internalfb.com/wiki/PyTorch/Teams/Edge/PyTorch_Edge_Core_Team/Dtype_Selective_Build/""")
753753

754754
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):
756756
fail("""
757757
Dtype selective build with expose_operator_symbols=False works only in xplat -
758758
there are undefined symbols otherwise. Please try to use xplat, or talk to the

0 commit comments

Comments
 (0)