Skip to content

Conversation

@sgugger
Copy link
Collaborator

@sgugger sgugger commented Dec 6, 2022

What does this PR do?

This PR migrates the current integration with PyTorch 2.0 to use the entry point they introduced: torch.compile. As a consequence, the torchdynamo argument is deprecated to the profit of torch_compile_backend and torch_compile_mode. Setting either will trigger a model compilation.

@sgugger sgugger requested a review from LysandreJik December 6, 2022 21:13
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Dec 6, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

Very nice! Thanks @sgugger

@sgugger sgugger merged commit 9cc65f8 into main Dec 8, 2022
@sgugger sgugger deleted the torch_compile branch December 8, 2022 16:18
mpierrau pushed a commit to mpierrau/transformers that referenced this pull request Dec 15, 2022
* Migrate torchdynamo to torch.compile

* Add docstring and generic option

* Properly use the function...

* Reorg args
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants