move to ssize_t and keep the >=0 check for conv and kernel_ops#18142
move to ssize_t and keep the >=0 check for conv and kernel_ops#18142JakeStevens wants to merge 1 commit intopytorch:mainfrom
Conversation
Summary: Original code used unsigned for the bounds check with a "redundant" >= 0 check. This diff restores the >=0 but switches the variable(s) being check to ssize_t This allows for clean check when: stride_y * out_y + dilation_y * w_y < padding_y Previously, we were likely wrapping around and so still succeeding at: in_y < in_H because in_y underflows and becomes quite large. Differential Revision: D96322425
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18142
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 4 Unrelated FailuresAs of commit 51a222a with merge base 6381e58 ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
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 D96322425. |
This PR needs a
|
Summary:
Original code used unsigned for the bounds check with a "redundant" >= 0 check.
This diff restores the >=0 but switches the variable(s) being check to ssize_t
This allows for clean check when:
stride_y * out_y + dilation_y * w_y < padding_y
Previously, we were likely wrapping around and so still succeeding at:
in_y < in_H
because in_y underflows and becomes quite large.
Differential Revision: D96322425