Skip to content
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

Make CPU inductor work with dynamic shapes #93077

Closed
wants to merge 2 commits into from

Conversation

ezyang
Copy link
Contributor

@ezyang ezyang commented Jan 26, 2023

These errors were found by looking at wav2vec2

See #91719

Signed-off-by: Edward Z. Yang <ezyang@meta.com>

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Jan 26, 2023

🔗 Helpful Links

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

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

✅ No Failures

As of commit f2ad5c4:
💚 Looks good so far! There are no failures yet. 💚

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

ezyang added a commit that referenced this pull request Jan 26, 2023
These errors were found by looking at wav2vec2

See #91719

Signed-off-by: Edward Z. Yang <ezyangmeta.com>

ghstack-source-id: 51b6d644b4e30b9137354a4fb5eece5534d3412e
Pull Request resolved: #93077
@ezyang ezyang added topic: bug fixes topic category release notes: inductor ciflow/trunk Trigger trunk jobs on your pull request labels Jan 26, 2023
torch/_inductor/mkldnn.py Outdated Show resolved Hide resolved
torch/_inductor/mkldnn.py Outdated Show resolved Hide resolved
Comment on lines +91 to +92
if not dynamo_config.dynamic_shapes:
gm = mkldnn_fuse_fx(gm, example_inputs)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the problem of running mkldnn_fuse_fx with dynamic shapes? Fusions should work with both static and dynamic shapes. We can follow up with the fix to enable the dynamic shape. cc @XiaobingSuper

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that some of the mkl ops we fuse into don't have meta formulas, like the packing stuff. Whenever you work out the formulas here we can reenable this! However when I looked at it briefly it was not obvious how to fix

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the info, will do a follow-up fix to enable dynamic shapes here.

These errors were found by looking at wav2vec2

See #91719

Signed-off-by: Edward Z. Yang <ezyangmeta.com>

cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire

[ghstack-poisoned]
ezyang added a commit that referenced this pull request Jan 27, 2023
These errors were found by looking at wav2vec2

See #91719

Signed-off-by: Edward Z. Yang <ezyangmeta.com>

ghstack-source-id: f31fe08b8e91426f962c3ce6cc149b4bb4827a73
Pull Request resolved: #93077
@ezyang
Copy link
Contributor Author

ezyang commented Jan 27, 2023

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 1 jobs have failed, first few of them are: trunk / macos-12-py3-x86-64 / build

Details for Dev Infra team Raised by workflow job

@ezyang
Copy link
Contributor Author

ezyang commented Jan 27, 2023

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@facebook-github-bot facebook-github-bot deleted the gh/ezyang/1746/head branch June 8, 2023 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants