drop empty TARGETS in backends/mediatek/runtime - #21430
Conversation
Summary: Chunk 11 of fbcode/executorch TARGETS->BUCK migration. 5 directories that had only a TARGETS file with substantive fbcode-only content but were skipped from earlier chunks for various reasons (`fbcode_target(`, `fbcode_macros`, fbcode-only kwargs, etc.). Same chunk-6 pattern: created `targets.bzl` with `define_common_targets(is_fbcode = False)` whose body opens with `if not is_fbcode: return`, replaced TARGETS with a thin BUCK calling `define_common_targets(is_fbcode = is_fbcode())`. Directories migrated: - backends/aoti/tests - backends/cuda/runtime - backends/cuda/tests - extension/pybindings/fb - extension/pytree/test Differential Revision: D109082053
Summary: Add is_fbcode param to define_common_targets and early-return outside fbcode. The cxx_test rules use fbcode-only kwargs (keep_gpu_sections, re_test_utils.remote_execution) and were never evaluated in xplat (TARGETS-only pre-migration). Replaced TARGETS with thin BUCK calling define_common_targets(is_fbcode = is_fbcode()). Differential Revision: D109082041
Summary: Add is_fbcode early-return to existing define_common_targets. The cpp_unittest rules use fbcode-only kwargs (keep_gpu_sections, re_test_utils.remote_execution) and can't run in xplat. Replaced TARGETS with thin BUCK. Differential Revision: D109082049
Summary: Add is_fbcode early-return; replace TARGETS with thin BUCK. Differential Revision: D109082042
Summary: TARGETS contained fbcode-only Python rules (placeholder backend imports); BUCK contained xplat-only Apple platform cxx_library targets. Created a new targets.bzl with define_common_targets(is_fbcode = False) whose body splits via if/else: fbcode branch holds the Python rules, xplat branch holds the Apple cxx targets. Replaced BUCK with thin caller, deleted TARGETS. Differential Revision: D109082057
Summary: The TARGETS file was 0 bytes; BUCK defines the actual neuron_backend cxx_library targeting Android. fbcode now falls through to BUCK with no behavior change. Differential Revision: D109082047
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21430
Note: Links to docs will display an error until the docs builds have been completed. ❌ 4 New FailuresAs of commit d9e734c with merge base c7b6f52 ( NEW FAILURES - The following jobs have failed:
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 D109082047. |
There was a problem hiding this comment.
Pull request overview
This PR continues the TARGETS→BUCK migration by moving fbcode-only targets into targets.bzl helpers (invoked from BUCK), and removing now-redundant TARGETS files. It also removes the (previously empty) backends/mediatek/runtime/TARGETS so fbcode falls through to BUCK, while keeping the runtime library gated as non-fbcode.
Changes:
- Add per-directory
targets.bzl+BUCKentrypoints and delete legacyTARGETSfiles for several test/runtime packages. - Gate fbcode-only test targets behind
is_fbcodeto preserve prior “TARGETS-only” behavior. - Remove empty
backends/mediatek/runtime/TARGETSand wrap the Android Mediatek runtime target withnon_fbcode_target.
Reviewed changes
Copilot reviewed 25 out of 26 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| extension/pytree/test/targets.bzl | New fbcode-gated test target definitions extracted from legacy TARGETS. |
| extension/pytree/test/TARGETS | Deleted (migrated into targets.bzl + BUCK). |
| extension/pytree/test/BUCK | New entrypoint that calls define_common_targets(is_fbcode=...). |
| examples/models/llama/config/targets.bzl | Gate python_unittest target behind is_fbcode to preserve prior TARGETS-only semantics. |
| examples/models/llama/config/TARGETS | Deleted (replaced by BUCK calling targets.bzl). |
| examples/models/llama/config/BUCK | New entrypoint that calls define_common_targets(is_fbcode=...). |
| backends/mediatek/runtime/TARGETS | Removed empty TARGETS so fbcode resolves via BUCK. |
| backends/mediatek/runtime/BUCK | Wrap neuron_backend definition with non_fbcode_target to preserve previous fbcode behavior. |
| backends/cuda/tests/targets.bzl | New fbcode-gated CUDA Python test target definitions extracted from legacy TARGETS. |
| backends/cuda/tests/TARGETS | Deleted (migrated into targets.bzl + BUCK). |
| backends/cuda/tests/BUCK | New entrypoint that calls define_common_targets(is_fbcode=...). |
| backends/cuda/runtime/targets.bzl | New fbcode-gated CUDA runtime + unit test targets extracted from legacy TARGETS. |
| backends/cuda/runtime/TARGETS | Deleted (migrated into targets.bzl + BUCK). |
| backends/cuda/runtime/BUCK | New entrypoint that calls define_common_targets(is_fbcode=...). |
| backends/cuda/runtime/shims/tests/targets.bzl | Add is_fbcode gating to preserve prior TARGETS-only behavior. |
| backends/cuda/runtime/shims/tests/TARGETS | Deleted (replaced by BUCK calling targets.bzl). |
| backends/cuda/runtime/shims/tests/BUCK | New entrypoint that calls define_common_targets(is_fbcode=...). |
| backends/apple/coreml/targets.bzl | Consolidate prior split (fbcode Python rules vs xplat Apple cxx rules) into a single define_common_targets(is_fbcode=...). |
| backends/apple/coreml/TARGETS | Deleted (fbcode branch moved into targets.bzl). |
| backends/apple/coreml/BUCK | Simplified to call define_common_targets(is_fbcode=...) instead of inlining Apple rules. |
| backends/aoti/tests/targets.bzl | New fbcode-gated AOTI C++ test targets extracted from legacy TARGETS. |
| backends/aoti/tests/TARGETS | Deleted (migrated into targets.bzl + BUCK). |
| backends/aoti/tests/BUCK | New entrypoint that calls define_common_targets(is_fbcode=...). |
| backends/aoti/slim/factory/test/targets.bzl | Add is_fbcode gating to preserve prior TARGETS-only behavior for slim factory tests. |
| backends/aoti/slim/factory/test/TARGETS | Deleted (replaced by BUCK calling targets.bzl). |
| backends/aoti/slim/factory/test/BUCK | New entrypoint that calls define_common_targets(is_fbcode=...). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| load("@fbcode_macros//build_defs:build_file_migration.bzl", "non_fbcode_target") | ||
| load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") | ||
|
|
||
| oncall("executorch") | ||
|
|
This PR needs a
|
ndmitchell
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
Summary:
The TARGETS file was 0 bytes; BUCK defines the actual neuron_backend
cxx_library targeting Android. fbcode now falls through to BUCK with no
behavior change.
Differential Revision: D109082047