Revert "[2/N] Fix clang-tidy readability checks (#164652)"

This reverts commit 3c5ca685d6f5b6f3971c0cd20a054aa355610419.

Reverted https://github.com/pytorch/pytorch/pull/164652 on behalf of https://github.com/izaitsevfb due to need to revert due to a conflict with revert of https://github.com/pytorch/pytorch/pull/162659 ([comment](https://github.com/pytorch/pytorch/pull/164652#issuecomment-3369346707))
This commit is contained in:
PyTorch MergeBot
2025-10-05 21:36:57 +00:00
parent 5d7360bb03
commit 2c5ed6e7c0
89 changed files with 199 additions and 142 deletions

View File

@ -78,7 +78,8 @@ void flatten_rec(PyObject* obj, ParsedArgs& args) {
args.desc.metadata.emplace_back(var);
args.desc.structure.push_back(D::Bool);
} else if (PyLong_Check(obj)) { // Wrap longs in Long tensors
at::Tensor var = scalar_to_tensor(at::Scalar(THPUtils_unpackLong(obj)));
at::Tensor var = scalar_to_tensor(
at::Scalar(static_cast<int64_t>(THPUtils_unpackLong(obj))));
args.vars.push_back(var);
args.desc.metadata.emplace_back(var);
args.desc.structure.push_back(D::Long);