Skip to content

Commit a89d6b2

Browse files
fix
1 parent e6180bc commit a89d6b2

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

Diff for: backends/mlu/kernels/slice_kernel.cc

-8
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,6 @@ inline void CheckAndUpdateSliceAttrs(const phi::DDim in_dims,
234234

235235
if (dim_value > 0) {
236236
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-
243237
T start, end;
244238
bool dummy_zero_out_dim = false;
245239
normalize_interval((*starts)[i],
@@ -262,8 +256,6 @@ inline void CheckAndUpdateSliceAttrs(const phi::DDim in_dims,
262256
}
263257
}
264258

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

0 commit comments

Comments
 (0)