Browse Source

!558 add verification for tbe op attr

Merge pull request !558 from dengwentao/tbe_attr
tags/v0.2.0-alpha
mindspore-ci-bot Gitee 6 years ago
parent
commit
2cdb62629f
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      mindspore/ccsrc/kernel/tbe/tbe_kernel_build.cc

+ 4
- 0
mindspore/ccsrc/kernel/tbe/tbe_kernel_build.cc View File

@@ -383,6 +383,10 @@ bool TbeKernelJsonCreator::GenTbeAttrJson(const std::shared_ptr<AnfNode> &anf_no
attr_obj["name"] = attr_name;
attr_obj["valid"] = true;
(*attrs_json).push_back(attr_obj);
} else {
if (attr_ptr->param_type() == "required" && creater_type_ == SINGLE_BUILD && op_info->impl_path() != "") {
MS_LOG(EXCEPTION) << "op name: " << op_info->op_name() << " attr: " << attr_name << "is required, but not set.";
}
}
}
return true;


Loading…
Cancel
Save