diff --git a/paddle/phi/kernels/impl/slice_kernel_impl.h b/paddle/phi/kernels/impl/slice_kernel_impl.h index 78ed41d9f0758c1ed852bc44391d5b89b4fc8b64..2b1c2d87dbd61deffb6ec7b60b7cb5a0889b24cd 100644 --- a/paddle/phi/kernels/impl/slice_kernel_impl.h +++ b/paddle/phi/kernels/impl/slice_kernel_impl.h @@ -36,19 +36,8 @@ void SliceCompute(const Context& ctx, // Step 1: Get the accurate attribute value of starts and ends std::vector starts = starts_t; std::vector ends = ends_t; - PADDLE_ENFORCE_EQ( - starts.size(), - axes.size(), - phi::errors::InvalidArgument( - "The size of starts must be equal to the size of axes.")); - PADDLE_ENFORCE_EQ(ends.size(), - axes.size(), - phi::errors::InvalidArgument( - "The size of ends must be equal to the size of axes.")); - // Step 2: Compute output auto in = &input; - auto in_dims = in->dims(); auto out_dims = out->dims(); auto slice_dims = out_dims;