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

fix download bug when use multi gpus #13610

Merged
merged 1 commit into from
Aug 6, 2024
Merged

Conversation

changdazhou
Copy link
Collaborator

No description provided.

Verified

This commit was signed with the committer’s verified signature.
AArnott Andrew Arnott
@changdazhou changdazhou requested a review from GreatV August 6, 2024 11:18
Comment on lines +40 to +44
if dist.get_rank() == 0:
_download(url, save_path)
else:
while not os.path.exists(save_path):
time.sleep(1)
Copy link
Collaborator

Choose a reason for hiding this comment

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

目前,代码使用 dist.get_rank() == 0 判断是否为主节点,但如果在主节点下载文件时发生异常或失败,会不会导致其他节点可能会无限等待。

@changdazhou
Copy link
Collaborator Author

@GreatV 想问下这个什么时候能合入呢

Copy link
Collaborator

@GreatV GreatV left a comment

Choose a reason for hiding this comment

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

LGTM

@GreatV GreatV merged commit 20de659 into PaddlePaddle:main Aug 6, 2024
3 checks passed
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.

2 participants