From 1858fa3853d3e7f2983dd4789763407c5890db74 Mon Sep 17 00:00:00 2001 From: cecilia peng Date: Mon, 25 Oct 2021 20:36:13 +0800 Subject: [PATCH] [frontend][paddle] It is possible that get_output_partial_shape returns dynamic shape. Then we cannot simply check if it is 1. In case of BERT which input shape is dynamic, this check will absolutely fail. (#8030) --- ngraph/frontend/paddlepaddle/src/op/slice.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/ngraph/frontend/paddlepaddle/src/op/slice.cpp b/ngraph/frontend/paddlepaddle/src/op/slice.cpp index 86f0c658a1d..8874ca18d7c 100644 --- a/ngraph/frontend/paddlepaddle/src/op/slice.cpp +++ b/ngraph/frontend/paddlepaddle/src/op/slice.cpp @@ -77,13 +77,6 @@ NamedOutputs slice(const NodeContext& node) { auto decrease_axis = node.get_attribute>("decrease_axis"); if (decrease_axis.size() > 0) { - auto stride_slice_output_shape = stride_slice_node->get_output_partial_shape(0); - - for (size_t i = 0; i < decrease_axis.size(); ++i) - PDPD_OP_VALIDATION_CHECK(node, - stride_slice_output_shape[decrease_axis[i]] == 1, - "decrease dim should be 1!"); - auto squeeze_index_node = Constant::create(element::i32, {}, decrease_axis); auto decreased_node = std::make_shared(stride_slice_node, squeeze_index_node);