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

[BE][PG NCCL] Improve input mismatch error msg #107281

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 10 additions & 2 deletions torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1502,8 +1502,16 @@ std::vector<at::Tensor> flatten_for_scatter_gather(
if (tensor_lists[i].size() != world_size * num_devices) {
TORCH_CHECK(
false,
"Tensor list input to scatter/gather must match number of collective"
" participants");
c10::str(
"Tensor list input to scatter/gather must match number of collective participants ",
"but got ",
tensor_lists[i].size(),
" inputs",
" with world_size ",
world_size,
" and ",
num_devices,
Copy link
Member Author

Choose a reason for hiding this comment

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

this is always 1 afaik, so can also exclude it.

" devices."));
}

// Only check device match for the first tensor in the list; the call to
Expand Down