-
Notifications
You must be signed in to change notification settings - Fork 744
[RL] Support cpu tensor broadcast #7833
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -348,6 +348,13 @@ def clear_parameters(self, pid: int = 0, shutdown_process_group=False) -> None: | |
| if shutdown_process_group: | ||
| paddle.distributed.shutdown_process_group(self.parallel_config.ep_group) | ||
| if shutdown_process_group: | ||
| # ProcessGroupGloo has no shutdown(); remove it from paddle's registry | ||
| # before the global sweep to avoid AttributeError. | ||
| from paddle.distributed.collective import _get_group_map_by_name | ||
|
|
||
| for name, pg in list(_get_group_map_by_name().items()): | ||
| if pg.process_group is not None and not hasattr(pg.process_group, "shutdown"): | ||
| _get_group_map_by_name().pop(name, None) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 建议 在循环内重复调用 当前代码在循环内调用了两次 同时, 建议缓存引用,同时做防御性注释: group_map = _get_group_map_by_name() # internal API, cache once
for name, pg in list(group_map.items()):
if pg.process_group is not None and not hasattr(pg.process_group, "shutdown"):
group_map.pop(name, None) |
||
| paddle.distributed.shutdown_process_group() | ||
| self._update_shared_status(pid, ModelWeightsStatus.CLEARED) | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.