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

Pass backend-related ctx to TorchDynamo Optimize Context #201

Merged
merged 3 commits into from
May 5, 2022

Conversation

anijain2305
Copy link
Contributor

@anijain2305 anijain2305 commented May 4, 2022

Background - For aot_autograd_speedup_strategy, the user can assume that nvfuser is turned on by default. But, for now, we have to wrap the model call in with torch.jit.fuser("fuser2") separately.

This PR extends Dynamo OptimizationCtx to accept extra ctx from the backend, and directly call __enter__ and __exit__.

@Chillee @jansel

@anijain2305
Copy link
Contributor Author

Fixes a part of pytorch/pytorch#93751

@anijain2305 anijain2305 merged commit 18a0364 into pytorch:main May 5, 2022
davidberard98 added a commit to davidberard98/benchmark that referenced this pull request Aug 9, 2022
Summary:
Previously not added to TARGETS build file, so trying to run internally would fail when `--dynamo` is added to torchbench command

Also removed aot_autograd_speedup_strategy to reflect changes in pytorch/torchdynamo#201 (i.e. use `--torchdynamo aot_nvfuser` instead)

Differential Revision: D38445665

fbshipit-source-id: 4385902594ff79a5fe2cf2f3366961fcd552befc
facebook-github-bot pushed a commit to pytorch/benchmark that referenced this pull request Aug 9, 2022
Summary:
Pull Request resolved: #1091

Previously not added to TARGETS build file, so trying to run internally would fail when `--dynamo` is added to torchbench command

Also removed aot_autograd_speedup_strategy to reflect changes in pytorch/torchdynamo#201 (i.e. use `--torchdynamo aot_nvfuser` instead)

Reviewed By: xuzhao9

Differential Revision: D38445665

fbshipit-source-id: 013bdf5603da6e211936f354a1fccc5dccea1103
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.

3 participants