-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[Deploy] Change numModules type to unsigned
#74978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 3082d77 (more details on the Dr. CI page): ✅ None of the CI failures appear to be your fault 💚
❄️ 1 failure tentatively classified as flakybut reruns have not yet been triggered to confirm:
|
|
@malfet has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
cff330b to
9962797
Compare
|
@malfet has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
9962797 to
21b720e
Compare
|
@malfet has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
21b720e to
a1ee26c
Compare
As it should never be negative, should it?
a1ee26c to
3082d77
Compare
|
@malfet has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary: As it should never be negative, should it? Also, add `torch/csrc/deploy` to the list of clang-format checked folders (as they are internally) Last but not least: clang-tidy correctly identifies `totNumModules <= SIZE_MAX / sizeof(struct _frozen) - 1` as unneeded always true check (as `totNumModules` is int32, while SIZE_MAX is int64 and `sizeof(sturct_frozen)` is less than 4Gb ;) ) Pull Request resolved: #74978 Reviewed By: suo, tugsbayasgalan Differential Revision: D35261476 Pulled By: malfet fbshipit-source-id: 8a3432d2d9e96ded3f08baee14ccb43d2635a67d
|
Hey @malfet. |
As it should never be negative, should it?
Also, add
torch/csrc/deployto the list of clang-format checked folders (as they are internally)Last but not least: clang-tidy correctly identifies
totNumModules <= SIZE_MAX / sizeof(struct _frozen) - 1as unneeded always true check (astotNumModulesis int32, while SIZE_MAX is int64 andsizeof(sturct_frozen)is less than 4Gb ;) )