Skip to content

Remove duplicate fuse_batch_norm_with_linear target - #24213

Merged
JakeStevens merged 1 commit into
pytorch:mainfrom
JakeStevens:fix-duplicate-fuse-bn-linear-target
Oct 27, 2026
Merged

JakeStevens merged 1 commit into
pytorch:mainfrom
JakeStevens:fix-duplicate-fuse-bn-linear-target

Conversation

@JakeStevens

Copy link
Copy Markdown
Contributor

backends/transforms/targets.bzl defines the fuse_batch_norm_with_linear python_library twice (lines 138 and 152). The first copy comes from #24192. The second came in with the squash of #24193, whose branch picked up the block again when it was merged with main.

Buck refuses to register the same target twice, so any command that loads //backends/transforms/... fails:

error: Attempted to register target root//backends/transforms:fuse_batch_norm_with_linear twice

This breaks unittest-buck on main and on open PRs.

This change deletes the second, identical definition. No other targets in the file are duplicated.

Test plan

  • Checked that targets.bzl now defines each target name once.
  • CI: unittest-buck should get past the buck2 query step.

`backends/transforms/targets.bzl` defines the `fuse_batch_norm_with_linear`
`python_library` twice: once from pytorch#24192 and again from the squash of pytorch#24193,
which picked up the block a second time when the PR branch was merged with
`main`. Buck refuses to register the same target twice, so loading
`//backends/transforms/...` fails, which breaks `unittest-buck`.

Delete the second, identical definition.
@pytorch-bot

pytorch-bot Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24213

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 19 Pending

As of commit c6bc155 with merge base 7aca03b (image):

NEW FAILURE - The following job has failed:

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 Oct 27, 2026
@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.

@JakeStevens
JakeStevens merged commit 8739d28 into pytorch:main Oct 27, 2026
217 of 221 checks passed
Erik-Lundell pushed a commit to Erik-Lundell/executorch that referenced this pull request Oct 28, 2026
`backends/transforms/targets.bzl` defines the
`fuse_batch_norm_with_linear` `python_library` twice (lines 138 and
152). The first copy comes from pytorch#24192. The second came in with the
squash of pytorch#24193, whose branch picked up the block again when it was
merged with `main`.

Buck refuses to register the same target twice, so any command that
loads `//backends/transforms/...` fails:

```
error: Attempted to register target root//backends/transforms:fuse_batch_norm_with_linear twice
```

This breaks `unittest-buck` on `main` and on open PRs.

This change deletes the second, identical definition. No other targets
in the file are duplicated.

### Test plan
- Checked that `targets.bzl` now defines each target name once.
- CI: `unittest-buck` should get past the `buck2 query` step.
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants