Cast shape_.size() to int64_t before comparing with squash_dim (#37109)
Summary:
This is generating a considerable amount of warning messages since TensorIterator.h is included from a lot of files:
/home/hong/xusrc/pytorch/aten/src/ATen/native/TensorIterator.h:372:47:
warning: comparison of integers of different signs: 'const int64_t' (aka 'const long') and 'c10::SmallVectorTemplateCommon::size_type' (aka 'unsigned long') [-Wsign-compare]
TORCH_CHECK(squash_dim >= 0 && squash_dim < shape_.size(),
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37109
Differential Revision: D21242163
Pulled By: ngimel
fbshipit-source-id: aec2978ee76750676a449eb6671142a782658de3