Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

yushangdi
Copy link
Contributor

@yushangdi yushangdi commented Feb 28, 2025

Summary:
Fixes #147623

This code https://github.com/pytorch/pytorch/blob/main/aten/src/ATen/native/Normalization.cpp#L504-L518 produces guards that raise ConstraintViolation error in batchnorm op.

We disable cudnn in export tracing to avoid creating such guards

Dependency: We need to land microsoft/onnxscript#2085 first in onnxscript, and them bump the onnxscript version in #148388

Test Plan:

buck2 run mode/dev-nosan  //caffe2/test:test_export -- -r bn_dynamic_shapes

Differential Revision: D70357703

Copy link

pytorch-bot bot commented Feb 28, 2025

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit da059f1 with merge base 9db9593 (image):

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

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

@facebook-github-bot
Copy link
Contributor

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

yushangdi added a commit to yushangdi/pytorch that referenced this pull request Feb 28, 2025
…#148140)

Summary:

Fixes pytorch#147623

This code https://github.com/pytorch/pytorch/blob/main/aten/src/ATen/native/Normalization.cpp#L504-L518 produces guards that raise ConstraintViolation error in batchnorm op.

We disable cudnn in export tracing to avoid creating such guards.

In the exported graph, the `cudnn_enabled` input to `torch.ops.aten.batch_norm.default` will be False instead of True now.

Test Plan:
```
buck2 run mode/dev-nosan  //caffe2/test:test_export -- -r bn_dynamic_shapes
buck run fbcode//mode/dev-nosan //caffe2/test:test_export -- -r decomp_batch_norm
```

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

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

justinchuby pushed a commit to microsoft/onnxscript that referenced this pull request Mar 3, 2025
Fixes #2084

This is required to land pytorch/pytorch#148140
in torch.export().


cc @angelayi @@justinchuby

Co-authored-by: Shangdi Yu <[email protected]>
yushangdi added a commit to yushangdi/pytorch that referenced this pull request Mar 4, 2025
Summary:
title

required to land pytorch#148140 to include microsoft/onnxscript#2085

Test Plan: CI

Differential Revision: D70526777
yushangdi added a commit to yushangdi/pytorch that referenced this pull request Mar 4, 2025
Summary:
title

required to land pytorch#148140 to include microsoft/onnxscript#2085

Test Plan: CI

Differential Revision: D70526777
@justinchuby
Copy link
Collaborator

#148388

pytorchmergebot pushed a commit that referenced this pull request Mar 4, 2025
pytorchmergebot pushed a commit that referenced this pull request Mar 4, 2025
pytorchmergebot pushed a commit to min-jean-cho/pytorch that referenced this pull request Mar 5, 2025
yushangdi added a commit to yushangdi/pytorch that referenced this pull request Mar 5, 2025
…#148140)

Summary:

Fixes pytorch#147623

This code https://github.com/pytorch/pytorch/blob/main/aten/src/ATen/native/Normalization.cpp#L504-L518 produces guards that raise ConstraintViolation error in batchnorm op.

We disable cudnn in export tracing to avoid creating such guards.

In the exported graph, the `cudnn_enabled` input to `torch.ops.aten.batch_norm.default` will be False instead of True now.

Test Plan:
```
buck2 run mode/dev-nosan  //caffe2/test:test_export -- -r bn_dynamic_shapes
buck run fbcode//mode/dev-nosan //caffe2/test:test_export -- -r decomp_batch_norm
```

Differential Revision: D70357703
yushangdi added a commit to yushangdi/pytorch that referenced this pull request Mar 5, 2025
…#148140)

Summary:

Fixes pytorch#147623

This code https://github.com/pytorch/pytorch/blob/main/aten/src/ATen/native/Normalization.cpp#L504-L518 produces guards that raise ConstraintViolation error in batchnorm op.

We disable cudnn in export tracing to avoid creating such guards.

In the exported graph, the `cudnn_enabled` input to `torch.ops.aten.batch_norm.default` will be False instead of True now.

Test Plan:
```
buck2 run mode/dev-nosan  //caffe2/test:test_export -- -r bn_dynamic_shapes
buck run fbcode//mode/dev-nosan //caffe2/test:test_export -- -r decomp_batch_norm
```

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

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

…#148140)

Summary:
Pull Request resolved: pytorch#148140

Fixes pytorch#147623

This code https://github.com/pytorch/pytorch/blob/main/aten/src/ATen/native/Normalization.cpp#L504-L518 produces guards that raise ConstraintViolation error in batchnorm op.

We disable cudnn in export tracing to avoid creating such guards.

In the exported graph, the `cudnn_enabled` input to `torch.ops.aten.batch_norm.default` will be False instead of True now.

Test Plan:
```
buck2 run mode/dev-nosan  //caffe2/test:test_export -- -r bn_dynamic_shapes
buck run fbcode//mode/dev-nosan //caffe2/test:test_export -- -r decomp_batch_norm
```

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

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

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Mar 5, 2025
Copy link
Contributor

github-actions bot commented May 4, 2025

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the Stale label May 4, 2025
@github-actions github-actions bot closed this Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request fb-exported Stale topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

torch.export.export creates guards that denies exporting.

4 participants