Skip to content

Remove deprecated XNNPACK capture utilities and migrate tests#18134

Open
JacobSzwejbka wants to merge 2 commits intopytorch:mainfrom
JacobSzwejbka:export-D95605468
Open

Remove deprecated XNNPACK capture utilities and migrate tests#18134
JacobSzwejbka wants to merge 2 commits intopytorch:mainfrom
JacobSzwejbka:export-D95605468

Conversation

@JacobSzwejbka
Copy link
Contributor

Summary:
Delete capture_graph_for_xnnpack() and get_xnnpack_capture_config() which
were only used in test files and relied on the deprecated exir.capture API.
Migrate test_xnnpack_utils.py to use inline to_edge(export(...)) calls.
Remove the deprecated exports from xnnpack/init.py.

Differential Revision: D95605468

…pytorch#18111)

Summary:

Migrate test_pass_infra, test_debug_handle_map, test_delegate_map_builder,
test_backends_nested, and hta_partitioner_demo to use the torch.export.export()
+ to_edge() flow instead of the deprecated exir.capture() API.

Key changes:
- Replace exir.capture(model, inputs, CaptureConfig()).to_edge() with
  to_edge(export(model, inputs, strict=True))
- Wrap plain functions in nn.Module for torch.export compatibility
- Use dynamic debug handle extraction instead of hardcoded values in
  test_delegate_map_builder (handle numbering changed)
- Collapse lifted/unlifted pattern variants in hta_partitioner_demo
  since torch.export always produces lifted graphs

Differential Revision: D95605454
Summary:
Delete capture_graph_for_xnnpack() and get_xnnpack_capture_config() which
were only used in test files and relied on the deprecated exir.capture API.
Migrate test_xnnpack_utils.py to use inline to_edge(export(...)) calls.
Remove the deprecated exports from xnnpack/__init__.py.

Differential Revision: D95605468
@pytorch-bot
Copy link

pytorch-bot bot commented Mar 12, 2026

🔗 Helpful Links

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

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

❌ 6 New Failures, 1 Cancelled Job, 4 Pending, 2 Unrelated Failures

As of commit 3193513 with merge base eaf0d65 (image):

NEW FAILURES - The following jobs have failed:

CANCELLED JOB - The following job was cancelled. Please retry:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

BROKEN TRUNK - The following job failed but was present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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 Mar 12, 2026
@meta-codesync
Copy link
Contributor

meta-codesync bot commented Mar 12, 2026

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

@github-actions
Copy link

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.

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. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant