提交 6b4a6e55 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!1177 fix codex

Merge pull request !1177 from panyifeng/fix_codex
...@@ -1242,7 +1242,6 @@ FuncGraphPtr TupleGetItemTensor::GenerateFuncGraph(const AbstractBasePtrList &ar ...@@ -1242,7 +1242,6 @@ FuncGraphPtr TupleGetItemTensor::GenerateFuncGraph(const AbstractBasePtrList &ar
abstract::CheckArgsSize(op_name, args_spec_list, 2); abstract::CheckArgsSize(op_name, args_spec_list, 2);
AbstractTuplePtr branches_abs = abstract::CheckArg<AbstractTuple>(op_name, args_spec_list, 0); AbstractTuplePtr branches_abs = abstract::CheckArg<AbstractTuple>(op_name, args_spec_list, 0);
AbstractBasePtrList branches = branches_abs->elements(); AbstractBasePtrList branches = branches_abs->elements();
if (branches.size() > 0 && branches[0] != nullptr && branches[0]->isa<AbstractFunction>()) { if (branches.size() > 0 && branches[0] != nullptr && branches[0]->isa<AbstractFunction>()) {
FuncGraphPtr ret_graph = std::make_shared<FuncGraph>(); FuncGraphPtr ret_graph = std::make_shared<FuncGraph>();
ret_graph->set_flags(FUNC_GRAPH_FLAG_CORE, true); ret_graph->set_flags(FUNC_GRAPH_FLAG_CORE, true);
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#ifndef MINDSPORE_CCSRC_OPTIMIZER_IRPASS_SPECIAL_OP_ELIMINATE_H_ #ifndef MINDSPORE_CCSRC_OPTIMIZER_IRPASS_SPECIAL_OP_ELIMINATE_H_
#define MINDSPORE_CCSRC_OPTIMIZER_IRPASS_SPECIAL_OP_ELIMINATE_H_ #define MINDSPORE_CCSRC_OPTIMIZER_IRPASS_SPECIAL_OP_ELIMINATE_H_
#include <securec.h>
#include <vector> #include <vector>
#include <memory> #include <memory>
#include <algorithm> #include <algorithm>
...@@ -30,7 +31,6 @@ ...@@ -30,7 +31,6 @@
namespace mindspore { namespace mindspore {
namespace opt { namespace opt {
namespace irpass { namespace irpass {
class SpecialOpEliminater { class SpecialOpEliminater {
public: public:
SpecialOpEliminater() SpecialOpEliminater()
...@@ -172,7 +172,7 @@ class ZeroLikeFillZero : public AnfVisitor { ...@@ -172,7 +172,7 @@ class ZeroLikeFillZero : public AnfVisitor {
tensor::TensorPtr new_tensor_ptr = std::make_shared<tensor::Tensor>(tensor_type_ptr->type_id(), tensor_shape); tensor::TensorPtr new_tensor_ptr = std::make_shared<tensor::Tensor>(tensor_type_ptr->type_id(), tensor_shape);
size_t mem_size = GetTypeByte(tensor_type_ptr) * IntToSize(new_tensor_ptr->ElementsNum()); size_t mem_size = GetTypeByte(tensor_type_ptr) * IntToSize(new_tensor_ptr->ElementsNum());
char *data = reinterpret_cast<char *>(new_tensor_ptr->data_c(true)); char *data = reinterpret_cast<char *>(new_tensor_ptr->data_c(true));
std::memset(data, 0, mem_size); (void)memset_s(data, mem_size, 0, mem_size);
auto new_cnode = NewValueNode(new_tensor_ptr); auto new_cnode = NewValueNode(new_tensor_ptr);
new_cnode->set_abstract(new_tensor_ptr->ToAbstract()); new_cnode->set_abstract(new_tensor_ptr->ToAbstract());
......
...@@ -343,6 +343,7 @@ class LogConfigLexer { ...@@ -343,6 +343,7 @@ class LogConfigLexer {
class LogConfigParser { class LogConfigParser {
public: public:
explicit LogConfigParser(const std::string &cfg) : lexer(cfg) {} explicit LogConfigParser(const std::string &cfg) : lexer(cfg) {}
~LogConfigParser() = default;
bool Expect(LogConfigToken expected, LogConfigToken tok) { bool Expect(LogConfigToken expected, LogConfigToken tok) {
if (expected != tok) { if (expected != tok) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册