Skip to content

migrate exir test to use torch.cond instead of the hop directly #12695

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 22, 2025

Conversation

ydwu4
Copy link
Contributor

@ydwu4 ydwu4 commented Jul 21, 2025

Summary: torch.cond is the use-facing api, which allows closure, have safety checks etc.

Differential Revision: D78696006

Copy link

pytorch-bot bot commented Jul 21, 2025

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 1 New Failure

As of commit e45dacb with merge base e31eb56 (image):

NEW FAILURE - The following job has failed:

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

@facebook-github-bot facebook-github-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 21, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D78696006

@ydwu4
Copy link
Contributor Author

ydwu4 commented Jul 21, 2025

@pytorchbot label "release notes: none"

@pytorch-bot pytorch-bot bot added the release notes: none Do not include this in the release notes label Jul 21, 2025
ydwu4 added a commit to ydwu4/executorch-1 that referenced this pull request Jul 22, 2025
…rch#12695)

Summary:

torch.cond is the use-facing api, which allows closure, have safety checks etc.

Differential Revision: D78696006
@ydwu4 ydwu4 force-pushed the export-D78696006 branch from a2afd8f to f718bf0 Compare July 22, 2025 04:42
…rch#12695)

Summary:
Pull Request resolved: pytorch#12695

torch.cond is the use-facing api, which allows closure, have safety checks etc.

Differential Revision: D78696006
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D78696006

@ydwu4 ydwu4 force-pushed the export-D78696006 branch from f718bf0 to e45dacb Compare July 22, 2025 04:46
@JacobSzwejbka
Copy link
Contributor

do torch.map and torch.while exist as well

@ydwu4
Copy link
Contributor Author

ydwu4 commented Jul 22, 2025

haven't yet, they can be accessed via torch._higher_order_ops.map/while_loop now

@facebook-github-bot facebook-github-bot merged commit a624083 into pytorch:main Jul 22, 2025
99 of 102 checks passed
Conarnar pushed a commit to Conarnar/executorch that referenced this pull request Jul 25, 2025
Differential Revision: D78696006

Pull Request resolved: pytorch#12695
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 release notes: none Do not include this in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants