Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/177046
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit 139db2d with merge base b9d551d ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
malfet
left a comment
There was a problem hiding this comment.
Sure, though I wonder if clang-tidy already have a rule for it (if not, may be we should propose one)
| Do not use raw `throw` in C++ code. Use TORCH_CHECK, \ | ||
| TORCH_CHECK_WITH, C10_THROW_ERROR, or other error-reporting macros \ | ||
| instead. See c10/util/Exception.h for available macros. If this is a \ | ||
| re-throw (throw;), restructure the code to avoid try/catch/throw or \ |
There was a problem hiding this comment.
Perhaps a suggestion - can we add C10_RETHROW macro, and somehow use clang-tidy to detect it's used correctly?
|
@malfet this doesn't actually only forbid naked throw. It forbids any use of "throw ..." as well. So I don't expect there is a clang-tidy rule for it as it would prevent throwing exceptions :D |
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 1 checks: pull / linux-jammy-py3.10-gcc11 / test (distributed, 2, 2, linux.2xlarge) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Add pattern-based skip. Let me know if you prefer regular exclude list. Pull Request resolved: pytorch#177046 Approved by: https://github.com/malfet
Add pattern-based skip. Let me know if you prefer regular exclude list.