Skip to content

Commit a0abb40

Browse files
pytorchbotlucylq
andauthored
Dtype selective build: disable when not in xplat and add fail msg (#11219)
This PR was created by the merge bot to help merge the original PR into the main branch. ghstack PR number: #11090 by @lucylq ^ Please use this as the source of truth for the PR details, comments, and reviews ghstack PR base: https://github.com/pytorch/executorch/tree/gh/lucylq/84/base ghstack PR head: https://github.com/pytorch/executorch/tree/gh/lucylq/84/head Merge bot PR base: https://github.com/pytorch/executorch/tree/main Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/lucylq/84/orig @diff-train-skip-merge Co-authored-by: lucylq <[email protected]>
1 parent 875c718 commit a0abb40

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

examples/selective_build/targets.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def define_common_targets():
6565
deps = [
6666
":select_ops_in_dict",
6767
],
68-
dtype_selective_build = True,
68+
dtype_selective_build = is_xplat(),
6969
visibility = ["//executorch/..."],
7070
)
7171

@@ -78,7 +78,7 @@ def define_common_targets():
7878
deps = [
7979
":select_ops_in_dict",
8080
],
81-
dtype_selective_build = True,
81+
dtype_selective_build = is_xplat(),
8282
visibility = ["//executorch/..."],
8383
)
8484

shim_et/xplat/executorch/codegen/codegen.bzl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,8 +644,7 @@ def executorch_generated_lib(
644644

645645
if dtype_selective_build:
646646
if not expose_operator_symbols and not is_xplat():
647-
# TODO(T225169282): make this a fail once internal cases move to xplat.
648-
warning("""
647+
fail("""
649648
Dtype selective build with expose_operator_symbols=False works only in xplat -
650649
there are undefined symbols otherwise. Please try to use xplat, or talk to the
651650
executorch team. Setting expose_operator_symbols=True is not recommended as the

0 commit comments

Comments
 (0)