migrate is_fbcode-flagged TARGETS files to BUCK with runtime detection (#20404)#20404
migrate is_fbcode-flagged TARGETS files to BUCK with runtime detection (#20404)#20404bigfootjon wants to merge 2 commits into
Conversation
|
@bigfootjon has exported this pull request. If you are a Meta employee, you can view the originating Diff in D109082061. |
This PR needs a
|
There was a problem hiding this comment.
Pull request overview
This PR continues the fbcode/xplat Buck buildfile migration by removing redundant TARGETS files and ensuring BUCK-based entrypoints preserve is_fbcode-gated behavior via runtime cell detection.
Changes:
- Delete a large set of
TARGETSfiles that only delegated todefine_common_targets()intargets.bzl. - Update selected
BUCKfiles to calldefine_common_targets(is_fbcode = is_fbcode())(via@fbsource//tools/build_defs:fbsource_utils.bzl) to preserve fbcode-only branching behavior whenTARGETSis removed. - Keep
targets.bzlas the single source of truth for shared target definitions.
Reviewed changes
Copilot reviewed 48 out of 48 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| schema/test/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| schema/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| runtime/platform/test/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| runtime/platform/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| runtime/core/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| runtime/core/exec_aten/util/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| runtime/core/exec_aten/testing_util/test/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| runtime/core/exec_aten/testing_util/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| runtime/core/exec_aten/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| runtime/backend/test/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| runtime/backend/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| kernels/prim_ops/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| kernels/portable/cpu/util/test/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| kernels/portable/cpu/util/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| kernels/optimized/test/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| kernels/optimized/TARGETS | Removed delegating TARGETS file; previously passed fbcode flag positionally. |
| kernels/optimized/cpu/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| kernels/optimized/BUCK | Pass is_fbcode = is_fbcode() into define_common_targets for correct fbcode/xplat branching. |
| extension/threadpool/test/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| extension/threadpool/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| extension/testing_util/test/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| extension/testing_util/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| extension/tensor/test/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| extension/tensor/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| extension/runner_util/test/TARGETS | Removed delegating TARGETS file that explicitly set is_fbcode = True. |
| extension/runner_util/test/BUCK | Pass is_fbcode = is_fbcode() into define_common_targets for correct fbcode/xplat behavior. |
| extension/runner_util/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| extension/pytree/aten_util/test/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| extension/pytree/aten_util/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| extension/image/test/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| extension/image/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| extension/image/benchmark/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| extension/cuda/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| extension/aten_util/test/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| extension/aten_util/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| examples/qualcomm/executor_runner/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| examples/devtools/example_runner/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| configurations/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| codegen/tools/TARGETS | Removed delegating TARGETS file that explicitly set is_fbcode = True. |
| codegen/tools/BUCK | Pass is_fbcode = is_fbcode() into define_common_targets for correct fbcode/xplat branching. |
| codegen/test/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| backends/vulkan/test/op_tests/TARGETS | Removed delegating TARGETS file that explicitly set is_fbcode = True. |
| backends/vulkan/test/op_tests/BUCK | Pass is_fbcode = is_fbcode() into define_common_targets for correct fbcode/xplat branching. |
| backends/vulkan/test/custom_ops/TARGETS | Removed delegating TARGETS file that explicitly set is_fbcode = True. |
| backends/vulkan/test/custom_ops/BUCK | Pass is_fbcode = is_fbcode() into define_common_targets for correct fbcode/xplat branching. |
| backends/qualcomm/builders/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
| backends/qualcomm/aot/wrappers/TARGETS | Removed delegating TARGETS file in favor of BUCK-based evaluation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
#20404) Summary: Pull Request resolved: #20404 Chunk 2 of fbcode/executorch TARGETS->BUCK migration. 5 directories where TARGETS called `define_common_targets(is_fbcode = True)` and the sister BUCK called `define_common_targets()`. The shared targets.bzl actually branches on is_fbcode, so the flag must be preserved. Replaces the BUCK call with `define_common_targets(is_fbcode = is_fbcode())` using `fbsource_utils.is_fbcode()` for runtime cell detection, then deletes TARGETS. fbcode falls through to BUCK and gets the True branch as before; xplat keeps getting the False branch. Directories migrated: - backends/vulkan/test/custom_ops - backends/vulkan/test/op_tests - codegen/tools - extension/runner_util/test - kernels/optimized Reviewed By: mzlee Differential Revision: D109082061
7510f1f to
f116133
Compare
#20404) Summary: Chunk 2 of fbcode/executorch TARGETS->BUCK migration. 5 directories where TARGETS called `define_common_targets(is_fbcode = True)` and the sister BUCK called `define_common_targets()`. The shared targets.bzl actually branches on is_fbcode, so the flag must be preserved. Replaces the BUCK call with `define_common_targets(is_fbcode = is_fbcode())` using `fbsource_utils.is_fbcode()` for runtime cell detection, then deletes TARGETS. fbcode falls through to BUCK and gets the True branch as before; xplat keeps getting the False branch. Directories migrated: - backends/vulkan/test/custom_ops - backends/vulkan/test/op_tests - codegen/tools - extension/runner_util/test - kernels/optimized Reviewed By: mzlee Differential Revision: D109082061
f116133 to
b4dc58e
Compare
#20404) Summary: Chunk 2 of fbcode/executorch TARGETS->BUCK migration. 5 directories where TARGETS called `define_common_targets(is_fbcode = True)` and the sister BUCK called `define_common_targets()`. The shared targets.bzl actually branches on is_fbcode, so the flag must be preserved. Replaces the BUCK call with `define_common_targets(is_fbcode = is_fbcode())` using `fbsource_utils.is_fbcode()` for runtime cell detection, then deletes TARGETS. fbcode falls through to BUCK and gets the True branch as before; xplat keeps getting the False branch. Directories migrated: - backends/vulkan/test/custom_ops - backends/vulkan/test/op_tests - codegen/tools - extension/runner_util/test - kernels/optimized Reviewed By: mzlee Differential Revision: D109082061
cd378ad to
e38aa4f
Compare
#20404) Summary: Chunk 2 of fbcode/executorch TARGETS->BUCK migration. 5 directories where TARGETS called `define_common_targets(is_fbcode = True)` and the sister BUCK called `define_common_targets()`. The shared targets.bzl actually branches on is_fbcode, so the flag must be preserved. Replaces the BUCK call with `define_common_targets(is_fbcode = is_fbcode())` using `fbsource_utils.is_fbcode()` for runtime cell detection, then deletes TARGETS. fbcode falls through to BUCK and gets the True branch as before; xplat keeps getting the False branch. Directories migrated: - backends/vulkan/test/custom_ops - backends/vulkan/test/op_tests - codegen/tools - extension/runner_util/test - kernels/optimized Reviewed By: mzlee Differential Revision: D109082061
e38aa4f to
efa09b5
Compare
#20404) Summary: Pull Request resolved: #20404 Chunk 2 of fbcode/executorch TARGETS->BUCK migration. 5 directories where TARGETS called `define_common_targets(is_fbcode = True)` and the sister BUCK called `define_common_targets()`. The shared targets.bzl actually branches on is_fbcode, so the flag must be preserved. Replaces the BUCK call with `define_common_targets(is_fbcode = is_fbcode())` using `fbsource_utils.is_fbcode()` for runtime cell detection, then deletes TARGETS. fbcode falls through to BUCK and gets the True branch as before; xplat keeps getting the False branch. Directories migrated: - backends/vulkan/test/custom_ops - backends/vulkan/test/op_tests - codegen/tools - extension/runner_util/test - kernels/optimized Reviewed By: mzlee Differential Revision: D109082061
efa09b5 to
9760623
Compare
Summary: I messed this up the last time. This allows D109082061 to land (unbreaks GH CI on that diff) Differential Revision: D110204409
#20404) Summary: Pull Request resolved: #20404 Chunk 2 of fbcode/executorch TARGETS->BUCK migration. 5 directories where TARGETS called `define_common_targets(is_fbcode = True)` and the sister BUCK called `define_common_targets()`. The shared targets.bzl actually branches on is_fbcode, so the flag must be preserved. Replaces the BUCK call with `define_common_targets(is_fbcode = is_fbcode())` using `fbsource_utils.is_fbcode()` for runtime cell detection, then deletes TARGETS. fbcode falls through to BUCK and gets the True branch as before; xplat keeps getting the False branch. Directories migrated: - backends/vulkan/test/custom_ops - backends/vulkan/test/op_tests - codegen/tools - extension/runner_util/test - kernels/optimized Reviewed By: mzlee Differential Revision: D109082061
9760623 to
fc12153
Compare
#20404) Summary: Pull Request resolved: #20404 Chunk 2 of fbcode/executorch TARGETS->BUCK migration. 5 directories where TARGETS called `define_common_targets(is_fbcode = True)` and the sister BUCK called `define_common_targets()`. The shared targets.bzl actually branches on is_fbcode, so the flag must be preserved. Replaces the BUCK call with `define_common_targets(is_fbcode = is_fbcode())` using `fbsource_utils.is_fbcode()` for runtime cell detection, then deletes TARGETS. fbcode falls through to BUCK and gets the True branch as before; xplat keeps getting the False branch. Directories migrated: - backends/vulkan/test/custom_ops - backends/vulkan/test/op_tests - codegen/tools - extension/runner_util/test - kernels/optimized Reviewed By: mzlee Differential Revision: D109082061
fc12153 to
bfe5281
Compare
ndmitchell
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
Summary:
Chunk 2 of fbcode/executorch TARGETS->BUCK migration. 5 directories where
TARGETS called
define_common_targets(is_fbcode = True)and the sisterBUCK called
define_common_targets(). The shared targets.bzl actuallybranches on is_fbcode, so the flag must be preserved.
Replaces the BUCK call with
define_common_targets(is_fbcode = is_fbcode())using
fbsource_utils.is_fbcode()for runtime cell detection, then deletesTARGETS. fbcode falls through to BUCK and gets the True branch as before;
xplat keeps getting the False branch.
Directories migrated:
Reviewed By: mzlee
Differential Revision: D109082061