promote TARGETS content into placeholder BUCK files (#20407)#20407
promote TARGETS content into placeholder BUCK files (#20407)#20407bigfootjon wants to merge 1 commit into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20407
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 4f6b142 with merge base 40f6d18 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@bigfootjon has exported this pull request. If you are a Meta employee, you can view the originating Diff in D109082058. |
This PR needs a
|
There was a problem hiding this comment.
Pull request overview
Migrates additional directories in the fbcode ExecuTorch TARGETS→BUCK transition by deleting TARGETS files (previously the source of truth) and promoting their contents into BUCK files so fbcode resolves these packages via BUCK and the rules become visible to xplat via dirsync.
Changes:
- Deleted placeholder (or now-redundant)
TARGETSfiles across multiple directories. - Promoted real build rules from
TARGETSintoBUCKfor several packages (e.g., MPS, XNNPACK serialization, bundled_program, pytree, portable test). - Updated some BUCK entrypoints to pass
is_fbcode()intodefine_common_targetswhere the correspondingtargets.bzlsupports fbcode/xplat divergence.
Reviewed changes
Copilot reviewed 64 out of 72 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/TARGETS | Delete TARGETS entrypoint |
| schema/test/TARGETS | Delete TARGETS entrypoint |
| schema/TARGETS | Delete TARGETS entrypoint |
| runtime/platform/test/TARGETS | Delete TARGETS entrypoint |
| runtime/platform/TARGETS | Delete TARGETS entrypoint |
| runtime/core/TARGETS | Delete TARGETS entrypoint |
| runtime/core/exec_aten/util/TARGETS | Delete TARGETS entrypoint |
| runtime/core/exec_aten/testing_util/test/TARGETS | Delete TARGETS entrypoint |
| runtime/core/exec_aten/testing_util/TARGETS | Delete TARGETS entrypoint |
| runtime/core/exec_aten/TARGETS | Delete TARGETS entrypoint |
| runtime/backend/test/TARGETS | Delete TARGETS entrypoint |
| runtime/backend/TARGETS | Delete TARGETS entrypoint |
| kernels/prim_ops/TARGETS | Delete TARGETS entrypoint |
| kernels/portable/test/TARGETS | Delete TARGETS build rules |
| kernels/portable/test/BUCK | Promote TARGETS rules into BUCK |
| kernels/portable/cpu/util/test/TARGETS | Delete TARGETS entrypoint |
| kernels/portable/cpu/util/TARGETS | Delete TARGETS entrypoint |
| kernels/optimized/test/TARGETS | Delete TARGETS entrypoint |
| kernels/optimized/TARGETS | Delete TARGETS entrypoint |
| kernels/optimized/cpu/TARGETS | Delete TARGETS entrypoint |
| kernels/optimized/BUCK | Use is_fbcode() in BUCK |
| extension/training/TARGETS | Delete TARGETS build rules |
| extension/training/BUCK | Promote TARGETS rules into BUCK |
| extension/threadpool/test/TARGETS | Delete TARGETS entrypoint |
| extension/threadpool/TARGETS | Delete TARGETS entrypoint |
| extension/testing_util/test/TARGETS | Delete TARGETS entrypoint |
| extension/testing_util/TARGETS | Delete TARGETS entrypoint |
| extension/tensor/test/TARGETS | Delete TARGETS entrypoint |
| extension/tensor/TARGETS | Delete TARGETS entrypoint |
| extension/runner_util/test/TARGETS | Delete TARGETS entrypoint |
| extension/runner_util/test/BUCK | Use is_fbcode() in BUCK |
| extension/runner_util/TARGETS | Delete TARGETS entrypoint |
| extension/pytree/TARGETS | Delete TARGETS build rules |
| extension/pytree/BUCK | Promote TARGETS rules into BUCK |
| extension/pytree/aten_util/test/TARGETS | Delete TARGETS entrypoint |
| extension/pytree/aten_util/TARGETS | Delete TARGETS entrypoint |
| extension/kernel_util/test/TARGETS | Delete TARGETS entrypoint |
| extension/kernel_util/test/BUCK | Add BUCK entrypoint wrapper |
| extension/image/test/TARGETS | Delete TARGETS entrypoint |
| extension/image/TARGETS | Delete TARGETS entrypoint |
| extension/image/benchmark/TARGETS | Delete TARGETS entrypoint |
| extension/cuda/TARGETS | Delete TARGETS entrypoint |
| extension/aten_util/test/TARGETS | Delete TARGETS entrypoint |
| extension/aten_util/TARGETS | Delete TARGETS entrypoint |
| exir/emit/TARGETS | Delete TARGETS build rules |
| exir/emit/BUCK | Promote TARGETS rules into BUCK |
| examples/qualcomm/executor_runner/TARGETS | Delete TARGETS entrypoint |
| examples/models/llama/experimental/TARGETS | Delete TARGETS entrypoint |
| examples/models/llama/experimental/BUCK | Add BUCK entrypoint wrapper |
| devtools/etdump/data_sinks/tests/TARGETS | Delete TARGETS entrypoint |
| devtools/etdump/data_sinks/tests/BUCK | Add BUCK entrypoint wrapper |
| devtools/bundled_program/TARGETS | Delete TARGETS build rules |
| devtools/bundled_program/schema/TARGETS | Delete TARGETS build rules |
| devtools/bundled_program/schema/BUCK | Promote TARGETS rules into BUCK |
| devtools/bundled_program/BUCK | Promote TARGETS rules into BUCK |
| codegen/tools/TARGETS | Delete TARGETS entrypoint |
| codegen/tools/BUCK | Use is_fbcode() in BUCK |
| codegen/test/TARGETS | Delete TARGETS entrypoint |
| backends/xnnpack/serialization/TARGETS | Delete TARGETS build rules |
| backends/xnnpack/serialization/BUCK | Promote TARGETS rules into BUCK |
| backends/vulkan/test/op_tests/TARGETS | Delete TARGETS entrypoint |
| backends/vulkan/test/op_tests/BUCK | Use is_fbcode() in BUCK |
| backends/vulkan/test/custom_ops/TARGETS | Delete TARGETS entrypoint |
| backends/vulkan/test/custom_ops/BUCK | Use is_fbcode() in BUCK |
| backends/qualcomm/partition/TARGETS | Delete TARGETS entrypoint |
| backends/qualcomm/partition/BUCK | Add BUCK entrypoint wrapper |
| backends/apple/mps/TARGETS | Delete TARGETS build rules |
| backends/apple/mps/BUCK | Promote TARGETS rules into BUCK |
| backends/aoti/slim/util/test/BUCK | Add BUCK entrypoint wrapper |
| backends/aoti/slim/util/BUCK | Add BUCK entrypoint wrapper |
| backends/aoti/slim/c10/core/BUCK | Add BUCK entrypoint wrapper |
| backends/aoti/BUCK | Add BUCK entrypoint wrapper |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") | ||
| load(":targets.bzl", "define_common_targets") | ||
|
|
||
| oncall("executorch") | ||
|
|
||
| define_common_targets( | ||
| is_xplat = True, | ||
| platforms = [APPLE], | ||
| define_common_targets() |
Summary:
Chunk 4 of fbcode/executorch TARGETS->BUCK migration. 9 directories where
TARGETS contained the real fbcode-side build rules and BUCK was a tiny
placeholder (most were 4-8 lines like 'empty BUCK file to unblock landing').
Each TARGETS was scanned for fbcode-only constructs (`fbcode_macros`,
`fbcode_target(`, `cpp_unittest(`, `cpp_library(`, `cpp_binary(`,
`re_test_utils`, `keep_gpu_sections`, `buck_genrule`, `//tools/build/buck/`)
and only those without any of those flags are migrated here.
The TARGETS content is copied into BUCK (overwriting the placeholder) and
the TARGETS file is deleted. fbcode now resolves these dirs via BUCK
instead of TARGETS; the rules also become visible to xplat for the first
time via dirsync.
Directories migrated:
- backends/apple/mps
- backends/xnnpack/serialization
- devtools/bundled_program
- devtools/bundled_program/schema
- devtools/etdump/fb
- exir/emit
- extension/pytree
- extension/training
- kernels/portable/test
8 PROMOTE candidates remain on TARGETS for follow-up: backends/cortex_m/test,
examples/models/llama/fb, examples/qualcomm/oss_scripts/{llama,whisper},
exir/dialects/edge/test, exir/tests, kernels/fb/custom_ops, test/end2end.
They have fbcode-only loads (`fbcode_macros`) or kwargs and need
`is_fbcode()` gating.
Reviewed By: mzlee
Differential Revision: D109082058
6655b42 to
583c9c8
Compare
Summary: Pull Request resolved: #20407 Chunk 4 of fbcode/executorch TARGETS->BUCK migration. 9 directories where TARGETS contained the real fbcode-side build rules and BUCK was a tiny placeholder (most were 4-8 lines like 'empty BUCK file to unblock landing'). Each TARGETS was scanned for fbcode-only constructs (`fbcode_macros`, `fbcode_target(`, `cpp_unittest(`, `cpp_library(`, `cpp_binary(`, `re_test_utils`, `keep_gpu_sections`, `buck_genrule`, `//tools/build/buck/`) and only those without any of those flags are migrated here. The TARGETS content is copied into BUCK (overwriting the placeholder) and the TARGETS file is deleted. fbcode now resolves these dirs via BUCK instead of TARGETS; the rules also become visible to xplat for the first time via dirsync. Directories migrated: - backends/apple/mps - backends/xnnpack/serialization - devtools/bundled_program - devtools/bundled_program/schema - devtools/etdump/fb - exir/emit - extension/pytree - extension/training - kernels/portable/test 8 PROMOTE candidates remain on TARGETS for follow-up: backends/cortex_m/test, examples/models/llama/fb, examples/qualcomm/oss_scripts/{llama,whisper}, exir/dialects/edge/test, exir/tests, kernels/fb/custom_ops, test/end2end. They have fbcode-only loads (`fbcode_macros`) or kwargs and need `is_fbcode()` gating. Reviewed By: mzlee Differential Revision: D109082058
583c9c8 to
a23f524
Compare
Summary:
Chunk 4 of fbcode/executorch TARGETS->BUCK migration. 9 directories where
TARGETS contained the real fbcode-side build rules and BUCK was a tiny
placeholder (most were 4-8 lines like 'empty BUCK file to unblock landing').
Each TARGETS was scanned for fbcode-only constructs (`fbcode_macros`,
`fbcode_target(`, `cpp_unittest(`, `cpp_library(`, `cpp_binary(`,
`re_test_utils`, `keep_gpu_sections`, `buck_genrule`, `//tools/build/buck/`)
and only those without any of those flags are migrated here.
The TARGETS content is copied into BUCK (overwriting the placeholder) and
the TARGETS file is deleted. fbcode now resolves these dirs via BUCK
instead of TARGETS; the rules also become visible to xplat for the first
time via dirsync.
Directories migrated:
- backends/apple/mps
- backends/xnnpack/serialization
- devtools/bundled_program
- devtools/bundled_program/schema
- devtools/etdump/fb
- exir/emit
- extension/pytree
- extension/training
- kernels/portable/test
8 PROMOTE candidates remain on TARGETS for follow-up: backends/cortex_m/test,
examples/models/llama/fb, examples/qualcomm/oss_scripts/{llama,whisper},
exir/dialects/edge/test, exir/tests, kernels/fb/custom_ops, test/end2end.
They have fbcode-only loads (`fbcode_macros`) or kwargs and need
`is_fbcode()` gating.
Reviewed By: mzlee
Differential Revision: D109082058
a23f524 to
2b6150b
Compare
Summary: Pull Request resolved: #20407 Chunk 4 of fbcode/executorch TARGETS->BUCK migration. 9 directories where TARGETS contained the real fbcode-side build rules and BUCK was a tiny placeholder (most were 4-8 lines like 'empty BUCK file to unblock landing'). Each TARGETS was scanned for fbcode-only constructs (`fbcode_macros`, `fbcode_target(`, `cpp_unittest(`, `cpp_library(`, `cpp_binary(`, `re_test_utils`, `keep_gpu_sections`, `buck_genrule`, `//tools/build/buck/`) and only those without any of those flags are migrated here. The TARGETS content is copied into BUCK (overwriting the placeholder) and the TARGETS file is deleted. fbcode now resolves these dirs via BUCK instead of TARGETS; the rules also become visible to xplat for the first time via dirsync. Directories migrated: - backends/apple/mps - backends/xnnpack/serialization - devtools/bundled_program - devtools/bundled_program/schema - devtools/etdump/fb - exir/emit - extension/pytree - extension/training - kernels/portable/test 8 PROMOTE candidates remain on TARGETS for follow-up: backends/cortex_m/test, examples/models/llama/fb, examples/qualcomm/oss_scripts/{llama,whisper}, exir/dialects/edge/test, exir/tests, kernels/fb/custom_ops, test/end2end. They have fbcode-only loads (`fbcode_macros`) or kwargs and need `is_fbcode()` gating. Reviewed By: mzlee Differential Revision: D109082058
2b6150b to
4f6b142
Compare
Summary:
Chunk 4 of fbcode/executorch TARGETS->BUCK migration. 9 directories where
TARGETS contained the real fbcode-side build rules and BUCK was a tiny
placeholder (most were 4-8 lines like 'empty BUCK file to unblock landing').
Each TARGETS was scanned for fbcode-only constructs (
fbcode_macros,fbcode_target(,cpp_unittest(,cpp_library(,cpp_binary(,re_test_utils,keep_gpu_sections,buck_genrule,//tools/build/buck/)and only those without any of those flags are migrated here.
The TARGETS content is copied into BUCK (overwriting the placeholder) and
the TARGETS file is deleted. fbcode now resolves these dirs via BUCK
instead of TARGETS; the rules also become visible to xplat for the first
time via dirsync.
Directories migrated:
8 PROMOTE candidates remain on TARGETS for follow-up: backends/cortex_m/test,
examples/models/llama/fb, examples/qualcomm/oss_scripts/{llama,whisper},
exir/dialects/edge/test, exir/tests, kernels/fb/custom_ops, test/end2end.
They have fbcode-only loads (
fbcode_macros) or kwargs and needis_fbcode()gating.Reviewed By: mzlee
Differential Revision: D109082058