提交 600ec569 编写于 作者: H hong19860320 提交者: GitHub

[NPU] Fix the compiling error caused by operators::ValidateShape() (#2876)

上级 9ae56306
......@@ -73,8 +73,7 @@ int ReshapeConverter(void* ctx, OpLite* op, KernelBase* kernel) {
auto shape =
std::vector<int>(actual_shape_data,
actual_shape_data + actual_shape_dims.production());
auto out_dims = lite::operators::ValidateShape(shape, x_dims);
auto out_shape = out_dims.Vectorize();
auto out_shape = lite::operators::ValidateShape(shape, x_dims);
if (out_shape.size() > 4) {
LOG(WARNING) << "[NPU] HiAI DDK only supports less than 4 dimensions, "
"but Shape has "
......@@ -88,8 +87,7 @@ int ReshapeConverter(void* ctx, OpLite* op, KernelBase* kernel) {
reshape_op->set_input_w(*actual_shape_node->data());
} else {
auto shape = op_info->GetAttr<std::vector<int>>("shape");
auto out_dims = lite::operators::ValidateShape(shape, x_dims);
auto out_shape = out_dims.Vectorize();
auto out_shape = lite::operators::ValidateShape(shape, x_dims);
if (out_shape.size() > 4) {
LOG(WARNING) << "[NPU] HiAI DDK only supports less than 4 dimensions, "
"but shape has "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册