Skip to content

Migrate executorch/ tests from exir.capture to torch.export + to_edge#18111

Merged
meta-codesync[bot] merged 1 commit intopytorch:mainfrom
JacobSzwejbka:export-D95605454
Mar 13, 2026
Merged

Migrate executorch/ tests from exir.capture to torch.export + to_edge#18111
meta-codesync[bot] merged 1 commit intopytorch:mainfrom
JacobSzwejbka:export-D95605454

Conversation

@JacobSzwejbka
Copy link
Contributor

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

@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/18111

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

❌ 2 New Failures, 1 Pending, 2 Unrelated Failures

As of commit e1aa5b3 with merge base 090af6c (image):

NEW FAILURES - The following jobs have failed:

BROKEN TRUNK - The following jobs failed but were 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 D95605454.

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

JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Mar 12, 2026
…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
JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Mar 12, 2026
…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
JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Mar 12, 2026
…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
JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Mar 12, 2026
…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
JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Mar 12, 2026
…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
JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Mar 12, 2026
…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
JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Mar 12, 2026
…pytorch#18111)

Summary:
Pull Request resolved: pytorch#18111

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
JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Mar 12, 2026
…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

Reviewed By: Gasoonjia

Differential Revision: D95605454
JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Mar 12, 2026
…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

Reviewed By: Gasoonjia

Differential Revision: D95605454
…pytorch#18111)

Summary:
Pull Request resolved: pytorch#18111

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

Reviewed By: Gasoonjia

Differential Revision: D95605454
@meta-codesync meta-codesync bot merged commit 96aeb57 into pytorch:main Mar 13, 2026
155 of 161 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. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants