forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pt-vulkan] Address CLANGTIDY warnings in
api
, graph
, and impl
…
…folders (pytorch#116431) ## Context **Currently, `*.h` and `*.cpp` produces many lint warnings/errors from `clang-tidy` in the Meta internal Phabricator mirror**. These changes address all the lint warnings in the `api`, `graph`, and `impl` folders in preparation for upcoming planned work. ## Review Guide * Most changes are the result of automatically applied patches from `clang-tidy` * However, some warnings had to be manually addressed * There should be no functional changes * Many of the `clang-tidy` warnings arose from the `facebook-hte-BadMemberName` rule which checks for compliance with variable naming rules from Meta's internal C++ style guide * However, the rest of the ATen codebase does not conform to this rule, and PyTorch Vulkan was written to be consisten with ATen's naming conventions; thus, to stay consistent with the rest of ATen, this rule is disabled wherever relevant using `// @lint-ignore-every CLANGTIDY facebook-hte-BadMemberName` * Lint was disabled entirely for`vulkan_api_test.cpp` since there are too many warnings to address at the moment. Addressing all of them will be a small project of its own; thus, in the interim lint will be disabled to reduce distracting signals for developers. Internal: ## Notes for Internal Reviewers This diff was largely created with ``` cd ~/fbsource/xplat/caffe2/aten/src/ATen/native/vulkan arc lint -e extra -a --take CLANGTIDY * 2>&1 | tee ~/scratch/lint.txt ``` The above command automatically applied patches suggested by `clang-tidy`, and the rest of the warnings were addressed manually. To disable `facebook-hte-BadMemberName`, I found that disabling it via a `.clang-tidy` file didn't work with `arc lint`, and the only way that worked was through the adding a comment ``` // @lint-ignore-every CLANGTIDY facebook-hte-BadMemberName ``` Differential Revision: [D50336057](https://our.internmc.facebook.com/intern/diff/D50336057/) Pull Request resolved: pytorch#116431 Approved by: https://github.com/GregoryComer, https://github.com/kirklandsign
- Loading branch information
1 parent
bbe3261
commit 8d84b50
Showing
35 changed files
with
246 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.