Repository navigation
[native_group_norm] Do some basic code cleanups - #190246
benjaminglass1 wants to merge 10 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/190246
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 873024b with merge base 526b9ce ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
1. Take a bunch of cases where we check for (ptr == nullptr) and just make them implicit bool(ptr). 2. Remove a parameter to infinitely_differentiable_native_group_norm_backward that was unused. 3. Ensure gradient outputs from infinitely_differentiable_native_group_norm_backward don't read from undefined tensors. ghstack-source-id: 13cd28a Pull-Request: #190246
1. Take a bunch of cases where we check for (ptr == nullptr) and just make them implicit bool(ptr). 2. Remove a parameter to infinitely_differentiable_native_group_norm_backward that was unused. 3. Ensure gradient outputs from infinitely_differentiable_native_group_norm_backward don't read from undefined tensors. ghstack-source-id: 7896e85 Pull-Request: #190246
1. Take a bunch of cases where we check for (ptr == nullptr) and just make them implicit bool(ptr). 2. Remove a parameter to infinitely_differentiable_native_group_norm_backward that was unused. 3. Ensure gradient outputs from infinitely_differentiable_native_group_norm_backward don't read from undefined tensors. ghstack-source-id: 1f067cd Pull-Request: #190246
|
@claude do a review in a collapsed comment, focusing on whether there are any unintended side-effects of the code-cleanup, notably any behaviour changes. |
|
Claude finished @slayton58's task in 1m 22s —— View job Reviewed for behavior changes: the nullptr-to-implicit-bool rewrites and reformatting are all semantics-preserving, but two changes go beyond cosmetic cleanup — the CUDA Full review: unintended side-effects / behavior changesSummaryThis PR converts Behavior-preserving (verified)
More than cleanup — please confirm these are intended
Signature change
RecommendationApprove — no unintended behavior changes found. The only items beyond pure cleanup (the CUDA early-return move and the array value-init) are correct and, if anything, small improvements; consider a one-line mention in the PR description since they exceed the stated "make nullptr checks implicit bool" scope. |
slayton58
left a comment
There was a problem hiding this comment.
I'm comfortable with the changes and claude's assertions of unchanged functionality (modulo the flagged minor changes that I'm fine with)
|
Starting merge as part of PR stack under #190794 |
Pull Request resolved: #190794 Approved by: https://github.com/slayton58, https://github.com/Skylion007 ghstack dependencies: #186414, #190246
Take a bunch of cases where we check for (ptr == nullptr) and just make them implicit bool(ptr), as well as some assorted reformatting. Pull Request resolved: pytorch#190246 Approved by: https://github.com/slayton58 ghstack dependencies: pytorch#186414
Pull Request resolved: pytorch#190794 Approved by: https://github.com/slayton58, https://github.com/Skylion007 ghstack dependencies: pytorch#186414, pytorch#190246
Take a bunch of cases where we check for (ptr == nullptr) and just make them implicit bool(ptr), as well as some assorted reformatting. Pull Request resolved: pytorch#190246 Approved by: https://github.com/slayton58 ghstack dependencies: pytorch#186414
Pull Request resolved: pytorch#190794 Approved by: https://github.com/slayton58, https://github.com/Skylion007 ghstack dependencies: pytorch#186414, pytorch#190246
Take a bunch of cases where we check for (ptr == nullptr) and just make them implicit bool(ptr), as well as some assorted reformatting. Pull Request resolved: pytorch#190246 Approved by: https://github.com/slayton58 ghstack dependencies: pytorch#186414
Pull Request resolved: pytorch#190794 Approved by: https://github.com/slayton58, https://github.com/Skylion007 ghstack dependencies: pytorch#186414, pytorch#190246
Stack from ghstack (oldest at bottom):
Take a bunch of cases where we check for (ptr == nullptr) and just make them implicit bool(ptr), as well as some assorted reformatting.
cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @aditew01