Skip to content

Commit

Permalink
Print the exact variable values triggering the alert (pytorch#3038)
Browse files Browse the repository at this point in the history
Summary:
X-link: facebookresearch/FBGEMM#136

Pull Request resolved: pytorch#3038

As the title

Reviewed By: sryap

Differential Revision: D61804814

fbshipit-source-id: a44b6b45e31c0b41d34564afe0452877c9dccbbd
  • Loading branch information
Min Yu authored and facebook-github-bot committed Aug 26, 2024
1 parent 27db8cf commit d693267
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,12 @@ Tensor sum_reduce_to_one(
});

auto target_device_index = target_device.index();
TORCH_CHECK(target_device_index < num_gpus && target_device_index >= 0);
TORCH_CHECK(
target_device_index < num_gpus && target_device_index >= 0,
"target_device_index=",
target_device_index,
", num_gpus=",
num_gpus);

// Local reduction for tensors residing the same GPU.
// And if there's a tensor already in target device, use it for output tensor.
Expand Down

0 comments on commit d693267

Please sign in to comment.