From 7db717a1dc665eddb4f283f6f001a1d7df184798 Mon Sep 17 00:00:00 2001 From: Jacob Szwejbka Date: Wed, 11 Jun 2025 13:27:15 -0700 Subject: [PATCH] Revert "Add (and fix) OSS check that et_operator_library dtype_selective_build builds (#9245)" This reverts commit 7933ac97dc1cf1946d91a36f6d1fcc4ff152b1f0. --- .ci/scripts/unittest-buck2.sh | 4 +--- examples/selective_build/targets.bzl | 15 --------------- shim_et/xplat/executorch/codegen/codegen.bzl | 2 +- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/.ci/scripts/unittest-buck2.sh b/.ci/scripts/unittest-buck2.sh index eaad772a45e..5750f6f9f27 100755 --- a/.ci/scripts/unittest-buck2.sh +++ b/.ci/scripts/unittest-buck2.sh @@ -25,9 +25,7 @@ BUILDABLE_KERNELS_PRIM_OPS_TARGETS=$(buck2 query //kernels/prim_ops/... | grep - # //runtime/kernel/... is failing because //third-party:torchgen_files's shell script can't find python on PATH. # //runtime/test/... requires Python torch, which we don't have in our OSS buck setup. for op in "build" "test"; do - buck2 $op $BUILDABLE_OPTIMIZED_OPS \ - //examples/selective_build:select_all_dtype_selective_lib_portable_lib \ - //kernels/portable/... \ + buck2 $op $BUILDABLE_OPTIMIZED_OPS //kernels/portable/... \ $BUILDABLE_KERNELS_PRIM_OPS_TARGETS //runtime/backend/... //runtime/core/... \ //runtime/executor: //runtime/kernel/... //runtime/platform/... done diff --git a/examples/selective_build/targets.bzl b/examples/selective_build/targets.bzl index 0bf36088f37..4525b8f730f 100644 --- a/examples/selective_build/targets.bzl +++ b/examples/selective_build/targets.bzl @@ -25,21 +25,6 @@ def define_common_targets(): ], ) - executorch_generated_lib( - name = "select_all_dtype_selective_lib", - functions_yaml_target = "//executorch/kernels/portable:functions.yaml", - kernel_deps = [ - "//executorch/kernels/portable:operators", - ], - # Setting dtype_selective_build without using list or dict selection isn't a - # typical use case; we just do it here so that we can test that our mechanism - # for getting buck deps right for dtype_selective_build is working. - dtype_selective_build = True, - deps = [ - ":select_all_ops", - ], - ) - # Select a list of operators: defined in `ops` et_operator_library( name = "select_ops_in_list", diff --git a/shim_et/xplat/executorch/codegen/codegen.bzl b/shim_et/xplat/executorch/codegen/codegen.bzl index 9ccd3500ec3..de19d5b6988 100644 --- a/shim_et/xplat/executorch/codegen/codegen.bzl +++ b/shim_et/xplat/executorch/codegen/codegen.bzl @@ -752,7 +752,7 @@ def executorch_generated_lib( See: https://www.internalfb.com/wiki/PyTorch/Teams/Edge/PyTorch_Edge_Core_Team/Dtype_Selective_Build/""") if dtype_selective_build: - if not expose_operator_symbols and not (is_xplat() or runtime.is_oss): + if not expose_operator_symbols and not is_xplat(): fail(""" Dtype selective build with expose_operator_symbols=False works only in xplat - there are undefined symbols otherwise. Please try to use xplat, or talk to the