!45148 fix bug: dynamic shape of gathernd infershape

Merge pull request !45148 from Yanzhi_YI/gathernd_cpu
This commit is contained in:
i-robot 2022-11-08 02:13:03 +00:00 committed by Gitee
commit 976a965101
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 0 additions and 7 deletions

View File

@ -37,13 +37,6 @@ abstract::ShapePtr GatherNdInferShape(const PrimitivePtr &primitive, const std::
}
auto input_rank = input_shape.size();
auto indices_rank = indices_shape.size();
if (IsDynamic(input_shape)) {
ShapeVector output_shape_dyn;
for (size_t i = LongToSize(indices_shape[indices_rank - 1]); i < input_rank; ++i) {
output_shape_dyn.push_back(abstract::Shape::kShapeDimAny);
}
return std::make_shared<abstract::Shape>(output_shape_dyn);
}
(void)CheckAndConvertUtils::CheckInteger("Input of indices data", SizeToLong(input_rank), kGreaterEqual,
indices_shape[indices_rank - 1], prim_name);
std::vector<int64_t> output_shape;