提交 b5c16b8f 编写于 作者: J jackzhang235 提交者: jackzhang235

add CNML_CALL for cnmlxxx

上级 128cdc5c
...@@ -110,8 +110,8 @@ class Graph { ...@@ -110,8 +110,8 @@ class Graph {
if (!disable_batch_size_changeable) { if (!disable_batch_size_changeable) {
constexpr int input_dimNb = 4; constexpr int input_dimNb = 4;
bool input_dim_mutable[4] = {true, false, false, false}; bool input_dim_mutable[4] = {true, false, false, false};
cnmlSetTensorDimMutable( CNML_CALL(cnmlSetTensorDimMutable(
tensor->mlu_tensor(), input_dim_mutable, input_dimNb); tensor->mlu_tensor(), input_dim_mutable, input_dimNb));
} }
} }
......
...@@ -179,6 +179,8 @@ class SubgraphEngine : public subgraph::Engine { ...@@ -179,6 +179,8 @@ class SubgraphEngine : public subgraph::Engine {
auto op = inst.op(); auto op = inst.op();
CHECK(op); CHECK(op);
std::string op_type = op->op_info()->Type(); 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_ && if (!disable_batch_size_changeable_ &&
std::find(unsupport_batch_size_changeable_op_type_.begin(), std::find(unsupport_batch_size_changeable_op_type_.begin(),
unsupport_batch_size_changeable_op_type_.end(), unsupport_batch_size_changeable_op_type_.end(),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册