Skip to content

Commit ef56497

Browse files
malfetpytorchmergebot
authored andcommitted
Fix sign-compare in c10d/Utils.hpp
Prerequisite change for enabling `-Werror=sign-compare` across PyTorch repo Pull Request resolved: pytorch#75081 Approved by: https://github.com/atalman
1 parent ff404ce commit ef56497

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torch/csrc/distributed/c10d/Utils.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ inline void checkSplitSizes(
407407
"Tensor's dim 0 does not divide equally across group size");
408408
} else {
409409
TORCH_CHECK(
410-
split_sizes.size() == group_size,
410+
split_sizes.size() == static_cast<size_t>(group_size),
411411
"Number of tensor splits not equal to group size");
412412
const auto sum = c10::sum_integers(split_sizes);
413413
TORCH_CHECK(

0 commit comments

Comments
 (0)