diff --git a/lite/kernels/mlu/bridges/graph.h b/lite/kernels/mlu/bridges/graph.h index 6cf40675397eef2db96a51e21b76296e6695e317..b927883b6fad570ec4da3dace342929bbd3aab92 100644 --- a/lite/kernels/mlu/bridges/graph.h +++ b/lite/kernels/mlu/bridges/graph.h @@ -110,8 +110,8 @@ class Graph { if (!disable_batch_size_changeable) { constexpr int input_dimNb = 4; bool input_dim_mutable[4] = {true, false, false, false}; - cnmlSetTensorDimMutable( - tensor->mlu_tensor(), input_dim_mutable, input_dimNb); + CNML_CALL(cnmlSetTensorDimMutable( + tensor->mlu_tensor(), input_dim_mutable, input_dimNb)); } } diff --git a/lite/kernels/mlu/subgraph_compute.h b/lite/kernels/mlu/subgraph_compute.h index 72ab7cd2703d6834f1ab21082feaa71cdea8b27d..5d696a7402a33b3532a3c6c59a2cac3ccfe3daa0 100644 --- a/lite/kernels/mlu/subgraph_compute.h +++ b/lite/kernels/mlu/subgraph_compute.h @@ -179,6 +179,8 @@ class SubgraphEngine : public subgraph::Engine { auto op = inst.op(); CHECK(op); std::string op_type = op->op_info()->Type(); + // since cnml's compile api will not return error now, we simply check + // op's type if (!disable_batch_size_changeable_ && std::find(unsupport_batch_size_changeable_op_type_.begin(), unsupport_batch_size_changeable_op_type_.end(),