Skip to content

drop empty TARGETS in backends/mediatek/runtime (#21430) - #21430

Merged
meta-codesync[bot] merged 2 commits into
pytorch:mainfrom
bigfootjon:export-D109082047
Jul 31, 2026
Merged

drop empty TARGETS in backends/mediatek/runtime (#21430)#21430
meta-codesync[bot] merged 2 commits into
pytorch:mainfrom
bigfootjon:export-D109082047

Conversation

@bigfootjon

@bigfootjon bigfootjon commented Jul 28, 2026

Copy link
Copy Markdown
Member

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.

Reviewed By: ndmitchell

Differential Revision: D109082047

Copilot AI review requested due to automatic review settings July 28, 2026 16:16
@pytorch-bot

pytorch-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown

🔗 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.

✅ No Failures

As of commit dec6b25 with merge base d8c6be2 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 28, 2026
@meta-codesync

meta-codesync Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

@bigfootjon has exported this pull request. If you are a Meta employee, you can view the originating Diff in D109082047.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 + BUCK entrypoints and delete legacy TARGETS files for several test/runtime packages.
  • Gate fbcode-only test targets behind is_fbcode to preserve prior “TARGETS-only” behavior.
  • Remove empty backends/mediatek/runtime/TARGETS and wrap the Android Mediatek runtime target with non_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.

Comment on lines +8 to 12
load("@fbcode_macros//build_defs:build_file_migration.bzl", "non_fbcode_target")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")

oncall("executorch")

@github-actions

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@ndmitchell ndmitchell left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

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
@meta-codesync meta-codesync Bot changed the title drop empty TARGETS in backends/mediatek/runtime drop empty TARGETS in backends/mediatek/runtime (#21430) Jul 31, 2026
bigfootjon added a commit to bigfootjon/executorch that referenced this pull request Jul 31, 2026
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.

Reviewed By: ndmitchell

Differential Revision: D109082047
Copilot AI review requested due to automatic review settings July 31, 2026 15:46
bigfootjon added a commit to bigfootjon/executorch that referenced this pull request Jul 31, 2026
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.

Reviewed By: ndmitchell

Differential Revision: D109082047
Summary:
Pull Request resolved: pytorch#21430

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.

Reviewed By: ndmitchell

Differential Revision: D109082047
bigfootjon added a commit to bigfootjon/executorch that referenced this pull request Jul 31, 2026
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.

Reviewed By: ndmitchell

Differential Revision: D109082047
bigfootjon added a commit to bigfootjon/executorch that referenced this pull request Jul 31, 2026
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.

Reviewed By: ndmitchell

Differential Revision: D109082047

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated no new comments.

Suppressed comments (1)

backends/apple/coreml/BUCK:9

  • The PR description/title focuses on removing an empty TARGETS in backends/mediatek/runtime, but this change also migrates backends/apple/coreml build definitions (deleting TARGETS content, rewriting BUCK to dispatch via is_fbcode(), and adding targets.bzl). Please update the PR description/title to reflect the CoreML migration work as well (or split into a separate PR) so reviewers and release notes capture the full scope.
define_common_targets(is_fbcode = is_fbcode())

Copilot AI review requested due to automatic review settings July 31, 2026 15:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated no new comments.

Suppressed comments (2)

backends/apple/coreml/targets.bzl:10

  • The docstring says the pre-migration TARGETS file contained only “fbcode-only Python rules”, but the deleted TARGETS file also defined C++ targets (e.g., coreml_backend_options and coreml_backend_options_test). This makes the new targets.bzl documentation inaccurate/misleading.
    Pre-migration this dir had a TARGETS file (fbcode-only Python rules)
    and a BUCK file (xplat-only Apple platform cxx_library rules). The
    branches below preserve that exact split.

backends/apple/coreml/BUCK:9

  • The PR description/title focus on dropping an empty Mediatek TARGETS file, but this PR also removes backends/apple/coreml/TARGETS, adds backends/apple/coreml/targets.bzl, and refactors backends/apple/coreml/BUCK to call into it. Please update the PR description (or split the PR) so reviewers/CI owners understand the CoreML build migration scope.
define_common_targets(is_fbcode = is_fbcode())

@meta-codesync
meta-codesync Bot merged commit cdc5d28 into pytorch:main Jul 31, 2026
197 of 198 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants