Commit Graph

1 Commits

Author SHA1 Message Date
mikey dagitses
4ff71c91d3 backport std::ssize to c10 (#97442)
backport std::ssize to c10

Summary:
Now that we have -Werror=sign-compare enabled, we encounter a lot of
friction comparing standard containers and our tensors which are
signed.

std::ssize will make it easier and safer to succinctly convert
container sizes to a signed type.

Test Plan: Added a unit test.

Reviewers: ezyang

Subscribers:

Tasks:

Tags:

---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/pytorch/pytorch/pull/97442).
* #97443
* __->__ #97442
Pull Request resolved: https://github.com/pytorch/pytorch/pull/97442
Approved by: https://github.com/ezyang
2023-03-24 17:56:05 +00:00