Skip to content

Commit

Permalink
[Reducer] small fix (pytorch#74127)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#74127

getRank() is now public.
ghstack-source-id: 151319258

Test Plan: CI

Reviewed By: zhaojuanmao

Differential Revision: D34833222

fbshipit-source-id: a846509e2d61dd9208706d471c7c83819ce24922
(cherry picked from commit 119974a)
  • Loading branch information
rohan-varma authored and pytorchmergebot committed Mar 15, 2022
1 parent 017be34 commit 3b421af
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions torch/csrc/distributed/c10d/reducer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2126,10 +2126,9 @@ void verify_params_across_processes(
i = 0;
for (const auto p : c10::irange(params.size())) {
const auto& t = params[p];
// I'd like to include which process we are in the message,
// but ProcessGroup::getRank is not public!
for (const auto& sz : t.sizes()) {
auto msg = c10::str("params[", p, "] in this process",
auto msg = c10::str("[", process_group->getRank(),
"]: params[", p, "] in this process",
" with sizes ",
t.sizes(),
" appears not to match sizes of the same param in process 0.");
Expand Down

0 comments on commit 3b421af

Please sign in to comment.