Skip to content

Commit 8d06ed3

Browse files
authored
Fix off-by-on error
Differential Revision: D88765156 Pull Request resolved: #16163
1 parent 0e2a6fb commit 8d06ed3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernels/portable/cpu/op_constant_pad_nd.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ void apply_padding_to_dim(
8787
ET_KERNEL_CHECK_MSG(
8888
ctx,
8989
out_data != self_data &&
90-
((out_data + copy_len < self_data) ||
91-
(self_data + copy_len < out_data)),
90+
((out_data + copy_len <= self_data) ||
91+
(self_data + copy_len <= out_data)),
9292
InvalidArgument,
9393
/* void */,
9494
"Out tensor overlaps with the input tensor. This is not supported.");

0 commit comments

Comments
 (0)