Fix unsigned comparison check in const pad kernel#18233
Conversation
Summary: The logic is: ``` size_t pad_i = ndim - 1 - i; if (pad_i >= 0 pad_i < pad.size() / 2) ``` the loop range is irange(ndim) so the min val is when we are at the end of the iterator ndim - 1 - i is ndim - 1 - (ndim - 1) = 0 pad_i >= 0 check is redundant Differential Revision: D96926279
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18233
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 2686385 with merge base 31118d7 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@JakeStevens has exported this pull request. If you are a Meta employee, you can view the originating Diff in D96926279. |
This PR needs a
|
Summary:
The logic is:
the loop range is irange(ndim)
so the min val is when we are at the end of the iterator
ndim - 1 - i
is
ndim - 1 - (ndim - 1)
= 0
pad_i >= 0 check is redundant
Differential Revision: D96926279