pytorch
fa8cd06a - Perform explicit cast (#46771)

Commit
4 years ago
Perform explicit cast (#46771) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/46771 `std::ceil` returns a `float` which is cast to `size_t` by the `max` operation. We convert to `int64_t` to suppress the warning while matching the type of `newDims[0]`. Since the types match, we don't need an explicit template type for `max`. This allows `max` to take `int64_t` as its values, matching the type of `newCapacity`. Test Plan: Standard pre-commit test rig. Reviewed By: malfet Differential Revision: D24481684 fbshipit-source-id: aed7cabc1e9d395b2662cb633f3ace19c279ab4c
Author
Parents
Loading