Skip to content

Decouple device_map='auto' and tp_plan='auto' - #38942

Merged
SunMarc merged 4 commits into
mainfrom
device-map-tp-plan
Jul 3, 2025
Merged

SunMarc merged 4 commits into
mainfrom
device-map-tp-plan

Conversation

@SunMarc

@SunMarc SunMarc commented Jun 20, 2025

Copy link
Copy Markdown
Member

What does this PR do?

Fixes #38771.
This PR decouples device_map='auto' and tp_plan='auto'. Before, launching a distributed run when the device_map was set to "auto" triggered TP. We removed that and the user should instead pass tp_plan="auto" or tp_size to tigger TP.
Also, we warn/info that this might lead to an unexpected behavior with someone tries to run a distributed run with device_map = "auto".

@SunMarc
SunMarc requested a review from ArthurZucker June 20, 2025 14:18
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@ArthurZucker ArthurZucker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

as it is a bit breaking let's add warning to the title PR

@weifengpy

Copy link
Copy Markdown

is it possible to land this? people are still hitting DTensor + DDP error and filing issues in pytorch

@SunMarc
SunMarc merged commit bff964c into main Jul 3, 2025
@SunMarc
SunMarc deleted the device-map-tp-plan branch July 3, 2025 09:07
@SunMarc

SunMarc commented Jul 3, 2025

Copy link
Copy Markdown
Member Author

Merged !

zaristei pushed a commit to zaristei/transformers that referenced this pull request Sep 9, 2025
zaristei pushed a commit to zaristei/transformers that referenced this pull request Sep 9, 2025
zaristei pushed a commit to zaristei/transformers that referenced this pull request Sep 9, 2025
zaristei pushed a commit to zaristei/transformers that referenced this pull request Sep 9, 2025
zaristei pushed a commit to zaristei/transformers that referenced this pull request Sep 9, 2025
zaristei pushed a commit to zaristei/transformers that referenced this pull request Sep 9, 2025
zaristei pushed a commit to zaristei/transformers that referenced this pull request Sep 9, 2025
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.

device_map='auto' coupled with tp_plan='auto'

4 participants