Skip to content

Commit 55a2424

Browse files
fix
1 parent e6180bc commit 55a2424

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

backends/mlu/kernels/slice_kernel.cc

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -233,13 +233,6 @@ inline void CheckAndUpdateSliceAttrs(const phi::DDim in_dims,
233233
T dim_value = in_dims[axis];
234234

235235
if (dim_value > 0) {
236-
T step = steps == nullptr ? 1 : (*steps)[i];
237-
PADDLE_ENFORCE_NE(
238-
step,
239-
0,
240-
common::errors::InvalidArgument(
241-
"Step should not be 0, but received step = %d.", step));
242-
243236
T start, end;
244237
bool dummy_zero_out_dim = false;
245238
normalize_interval((*starts)[i],
@@ -262,8 +255,6 @@ inline void CheckAndUpdateSliceAttrs(const phi::DDim in_dims,
262255
}
263256
}
264257

265-
} // namespace custom_kernel
266-
267258
template <typename T = int64_t>
268259
inline phi::DDim GetSliceDims(const phi::DDim in_dims,
269260
const std::vector<T>& axes,

0 commit comments

Comments
 (0)