!88 sync-from-trunk-to-blue-zone-1012-c75b220spc1009

Merge pull request !88 from HW_KK/r1.0
pull/88/MERGE
mindspore-ci-bot 4 years ago committed by Gitee
commit dfd23235fa

@ -68,7 +68,8 @@ elseif(DEFINED ENV{D_LINK_PATH})
find_library(slog libslog.so ${GE_LIB_PATH})
find_library(mmpa libmmpa.so ${GE_LIB_PATH})
find_library(runtime libruntime.so ${GE_LIB_PATH})
find_library(msprof libmsprofiler.a ${GE_LIB_PATH})
find_library(msprof libmsprof.so ${GE_LIB_PATH})
find_library(msprofiler libmsprofiler.a ${GE_LIB_PATH})
find_library(register libregister.so ${GE_LIB_PATH})
find_library(hccl libhccl.so ${GE_LIB_PATH})
find_library(resource libresource.so ${GE_LIB_PATH})
@ -85,7 +86,8 @@ else()
set(ASCEND_RUNTIME_DIR ${ASCEND_DIR}/fwkacllib/lib64)
find_library(slog libslog.so ${ASCEND_DRIVER_DIR})
find_library(mmpa libmmpa.so ${ASCEND_DRIVER_DIR})
find_library(msprof libmsprofiler.a ${ASCEND_RUNTIME_DIR})
find_library(msprof libmsprof.so ${ASCEND_DRIVER_DIR})
find_library(msprofiler libmsprofiler.a ${ASCEND_RUNTIME_DIR})
find_library(hccl libhccl.so ${ASCEND_RUNTIME_DIR})
find_library(runtime libruntime.so ${ASCEND_RUNTIME_DIR})

@ -43,10 +43,10 @@ class OpsKernelInfoStore {
virtual ~OpsKernelInfoStore() {}
// initialize opsKernelInfoStore
virtual Status Initialize(const map<string, string> &options) = 0; /*lint -e148*/
virtual Status Initialize(const map<string, string> &options) = 0;
// close opsKernelInfoStore
virtual Status Finalize() = 0; /*lint -e148*/
virtual Status Finalize() = 0;
virtual Status CreateSession(const std::map<std::string, std::string> &session_options) { return SUCCESS; }
@ -66,11 +66,10 @@ class OpsKernelInfoStore {
virtual void opsFlagCheck(const ge::Node &node, std::string &opsFlag){};
// memory allocation requirement
virtual Status CalcOpRunningParam(Node &node) = 0; /*lint -e148*/
virtual Status CalcOpRunningParam(Node &node) = 0;
// generate task for op。
virtual Status GenerateTask(const Node &node, RunContext &context,
std::vector<domi::TaskDef> &tasks) = 0; /*lint -e148*/
virtual Status GenerateTask(const Node &node, RunContext &context, std::vector<domi::TaskDef> &tasks) = 0;
// only call fe engine interface to compile single op
virtual Status CompileOp(vector<ge::NodePtr> &node_vec) { return SUCCESS; }

@ -26,7 +26,6 @@
using std::string;
namespace ge {
/*lint -e148*/
struct RunContext {
rtModel_t model;
rtStream_t stream;
@ -41,8 +40,6 @@ struct RunContext {
std::vector<rtLabel_t> graphLabelList; // all labels of graph, order by ge label id(0,1,...)
};
/*lint +e148*/
struct Task {
uint32_t id;
uint16_t type;
@ -52,7 +49,6 @@ struct Task {
struct OpInfo {
string engine; // which engin
/*lint -e148*/
string opKernelLib; // which opsKernelStore
int computeCost; // compute cost
bool flagPartial; // whether to support is related to shape

@ -27,7 +27,6 @@
using std::map;
using std::string;
/*lint -e148*/
namespace ge {
class GraphOptimizer {
public:
@ -67,5 +66,4 @@ class GraphOptimizer {
virtual Status OptimizeFusedGraphAfterGraphSlice(ComputeGraph &graph) { return SUCCESS; }
};
} // namespace ge
/*lint +e148*/
#endif // INC_COMMON_OPTIMIZER_GRAPH_OPTIMIZER_H_

@ -70,7 +70,7 @@ using Status = uint32_t;
// General error code
GE_ERRORNO(0, 0, 0, 0, 0, SUCCESS, 0, "success");
GE_ERRORNO(0b11, 0b11, 0b111, 0xFF, 0b11111, FAILED, 0xFFF, "failed"); /*lint !e401*/
GE_ERRORNO(0b11, 0b11, 0b111, 0xFF, 0b11111, FAILED, 0xFFF, "failed");
} // namespace ge
#endif // INC_EXTERNAL_GE_GE_API_ERROR_CODES_H_

@ -34,7 +34,6 @@ using std::vector;
namespace ge {
class AttrValueImpl;
/*lint -e148*/
class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY AttrValue {
public:
using INT = int64_t;
@ -70,6 +69,5 @@ class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY AttrValue {
VALUE_SET_GET_DEC(AttrValue::FLOAT)
#undef VALUE_SET_GET_DEC
};
/*lint +e148*/
} // namespace ge
#endif // INC_EXTERNAL_GRAPH_ATTR_VALUE_H_

@ -63,7 +63,6 @@ using std::function;
using std::shared_ptr;
using std::string;
/*lint -e148*/
class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY Operator {
public:
friend class OperatorImpl;
@ -91,7 +90,7 @@ class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY Operator {
explicit Operator(const string &type);
Operator(const string &name, const string &type); // lint !e148
Operator(const string &name, const string &type);
virtual ~Operator() = default;
@ -104,7 +103,7 @@ class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY Operator {
// Only has one output index = 0
Operator &SetInput(const string &dst_name, const Operator &src_oprt);
Operator &SetInput(const string &dst_name, const Operator &src_oprt, const string &name); // lint !e148
Operator &SetInput(const string &dst_name, const Operator &src_oprt, const string &name);
Operator &SetInput(const string &dst_name, const Operator &src_oprt, uint32_t index);
@ -128,22 +127,22 @@ class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY Operator {
TensorDesc GetOutputDesc(uint32_t index) const;
graphStatus UpdateOutputDesc(const string &name, const TensorDesc &tensor_desc); // lint !e148
graphStatus UpdateOutputDesc(const string &name, const TensorDesc &tensor_desc);
TensorDesc GetDynamicInputDesc(const string &name, uint32_t index) const;
graphStatus UpdateDynamicInputDesc(const string &name, uint32_t index, const TensorDesc &tensor_desc); // lint !e148
graphStatus UpdateDynamicInputDesc(const string &name, uint32_t index, const TensorDesc &tensor_desc);
TensorDesc GetDynamicOutputDesc(const string &name, uint32_t index) const;
graphStatus UpdateDynamicOutputDesc(const string &name, uint32_t index, const TensorDesc &tensor_desc); // lint !e148
graphStatus UpdateDynamicOutputDesc(const string &name, uint32_t index, const TensorDesc &tensor_desc);
graphStatus InferShapeAndType(); // lint !e148
graphStatus InferShapeAndType();
void SetInferenceContext(const InferenceContextPtr &inference_context);
InferenceContextPtr GetInferenceContext() const;
graphStatus VerifyAllAttr(bool disable_common_verifier = false); // lint !e148
graphStatus VerifyAllAttr(bool disable_common_verifier = false);
size_t GetInputsSize() const;
@ -256,20 +255,19 @@ class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY Operator {
void RequiredAttrRegister(const string &name);
graphStatus VerifyAll(); // lint !e148
graphStatus VerifyAll();
// Only has one output index = 0
Operator &SetInput(const string &dst_name, uint32_t dst_index, const Operator &src_oprt);
Operator &SetInput(const string &dst_name, uint32_t dst_index, const Operator &src_oprt,
const string &name); // lint !e148
Operator &SetInput(const string &dst_name, uint32_t dst_index, const Operator &src_oprt, const string &name);
void SubgraphRegister(const string &ir_name, bool dynamic);
void SubgraphCountRegister(const string &ir_name, uint32_t count);
void SetSubgraphBuilder(const string &ir_name, uint32_t index, const SubgraphBuilder &builder);
private:
Operator &SetInput(const string &dst_name, const OutHandler &out_handler); // lint !e148
Operator &SetInput(const string &dst_name, const OutHandler &out_handler);
OutHandler GetOutput(const string &name) const;
@ -283,7 +281,6 @@ class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY Operator {
std::shared_ptr<const Node> GetNode() const;
};
/*lint +e148*/
} // namespace ge
#endif // INC_EXTERNAL_GRAPH_OPERATOR_H_

@ -126,6 +126,5 @@ class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY Tensor {
friend class TensorAdapter;
};
} // namespace ge
/*lint +e148*/
#endif // INC_EXTERNAL_GRAPH_TENSOR_H_

@ -40,7 +40,6 @@ using std::to_string;
using std::unique_ptr;
using std::vector;
/*lint -e148*/
namespace ge {
class Operator;
class TensorDesc;
@ -159,5 +158,4 @@ namespace ge {
using OpRegistrationData = domi::OpRegistrationData;
using OpReceiver = domi::OpReceiver;
} // namespace ge
/*lint +e148*/
#endif // INC_EXTERNAL_REGISTER_REGISTER_H_

@ -301,7 +301,6 @@ class GE_FUNC_HOST_VISIBILITY GE_FUNC_DEV_VISIBILITY ScopeFusionPassRegistry {
private:
ScopeFusionPassRegistry();
class ScopeFusionPassRegistryImpl;
/*lint -e148*/
std::unique_ptr<ScopeFusionPassRegistryImpl> impl_;
friend class TensorFlowModelParser;
};

@ -14,7 +14,6 @@
* limitations under the License.
*/
/*lint -e* */
#ifndef INC_FRAMEWORK_COMMON_GE_INNER_ERROR_CODES_H_
#define INC_FRAMEWORK_COMMON_GE_INNER_ERROR_CODES_H_

@ -36,8 +36,8 @@ class StringUtils {
#endif
return s;
}
// lint -esym(551,*)
static std::string &Rtrim(std::string &s) { /*lint !e618*/
static std::string &Rtrim(std::string &s) {
#if __cplusplus >= 201103L
(void)s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int c) { return !std::isspace(c); }));
#else
@ -45,7 +45,7 @@ class StringUtils {
#endif
return s;
}
// lint -esym(551,*)
///
/// @ingroup domi_common
/// @brief delete spaces at the beginning and end of a string
@ -61,10 +61,8 @@ class StringUtils {
/// @param [in] delim separator
/// @return string array after segmentation
///
/*lint -e1077*/
static std::vector<std::string> Split(const std::string &str, char delim) {
std::vector<std::string> elems;
/*lint +e1077*/
if (str.empty()) {
elems.emplace_back("");

@ -57,11 +57,11 @@ class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY Buffer {
// For compatibility
inline const std::uint8_t *data() const { return GetData(); }
inline std::uint8_t *data() { return GetData(); } // lint !e659
inline std::uint8_t *data() { return GetData(); }
inline std::size_t size() const { return GetSize(); }
inline void clear() { return ClearBuffer(); }
uint8_t operator[](size_t index) const { // lint !e1022 !e1042
if (buffer_ != nullptr && index < buffer_->size()) { // lint !e574
uint8_t operator[](size_t index) const {
if (buffer_ != nullptr && index < buffer_->size()) {
return (uint8_t)(*buffer_)[index];
}
return 0xff;

@ -84,7 +84,6 @@ class ComputeGraph : public std::enable_shared_from_this<ComputeGraph>, public A
NodePtr FindNode(const std::string &name) const;
NodePtr FindFirstNodeMatchType(const std::string &name) const;
/*lint -e504*/
// AddNode with NodePtr
NodePtr AddNode(NodePtr node);
NodePtr AddNode(OpDescPtr op);
@ -152,7 +151,6 @@ class ComputeGraph : public std::enable_shared_from_this<ComputeGraph>, public A
graphStatus InsertEventNodes();
bool operator==(const ComputeGraph &r_compute_graph) const;
/*lint +e504*/
const std::map<std::vector<std::string>, std::vector<std::string>> &GetShareParamLayer() const {
return params_share_map_;
}

@ -14,7 +14,6 @@
* limitations under the License.
*/
/*lint -e618*/
#ifndef INC_GRAPH_DEBUG_GE_ATTR_DEFINE_H_
#define INC_GRAPH_DEBUG_GE_ATTR_DEFINE_H_
@ -1127,4 +1126,3 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY extern const std::string ATTR_ZER
} // namespace ge
#endif // INC_GRAPH_DEBUG_GE_ATTR_DEFINE_H_
/*lint +e618*/

@ -38,7 +38,7 @@ class TypeID {
bool operator==(const TypeID &__arg) const { return type_ == __arg.type_; }
private:
explicit TypeID(string type) : type_(std::move(type)) {} // lint !e30 !e32
explicit TypeID(string type) : type_(std::move(type)) {}
string type_;
};

@ -50,7 +50,7 @@ class OpDef;
class GraphDef;
} // namespace proto
using ProtoAttrMap = ::google::protobuf::Map<::std::string, ::ge::proto::AttrDef>; // lint !e1073
using ProtoAttrMap = ::google::protobuf::Map<::std::string, ::ge::proto::AttrDef>;
using ProtoMsgOwner = std::shared_ptr<::google::protobuf::Message>;
template <class ProtoType>
@ -147,7 +147,7 @@ class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY AttrHolder {
protected:
graphStatus AddRequiredAttr(const std::string &name);
const std::unordered_set<string> GetAllAttrNames() const;
const std::map<string, GeAttrValue> GetAllAttrs() const; // lint !e1073
const std::map<string, GeAttrValue> GetAllAttrs() const;
virtual ProtoAttrMapHelper MutableAttrMap() = 0;
virtual ConstProtoAttrMapHelper GetAttrMap() const = 0;

@ -310,7 +310,7 @@ class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY GeAttrValue {
VALUE_SET_GET_DEC(GeAttrValue::GRAPH)
VALUE_SET_GET_DEC(BYTES)
VALUE_SET_GET_DEC(NamedAttrs)
VALUE_SET_GET_DEC(ge::DataType) // lint !e665
VALUE_SET_GET_DEC(ge::DataType)
VALUE_SET_GET_DEC(vector<GeAttrValue::STR>)
VALUE_SET_GET_DEC(vector<GeAttrValue::INT>)
VALUE_SET_GET_DEC(vector<GeAttrValue::FLOAT>)
@ -320,8 +320,8 @@ class GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY GeAttrValue {
VALUE_SET_GET_DEC(vector<GeAttrValue::GRAPH>)
VALUE_SET_GET_DEC(vector<GeAttrValue::BYTES>)
VALUE_SET_GET_DEC(vector<NamedAttrs>)
VALUE_SET_GET_DEC(vector<vector<int64_t>>) // lint !e665
VALUE_SET_GET_DEC(vector<ge::DataType>) // lint !e665
VALUE_SET_GET_DEC(vector<vector<int64_t>>)
VALUE_SET_GET_DEC(vector<ge::DataType>)
#undef VALUE_SET_GET_DEC
GeIrProtoHelper<proto::AttrDef> value_;

@ -193,7 +193,7 @@ class Node : public std::enable_shared_from_this<Node> {
vector<OutDataAnchorPtr> out_data_anchors_;
InControlAnchorPtr in_control_anchor_;
OutControlAnchorPtr out_control_anchor_;
map<string, GeAttrValue> attrs_; // lint !e1073
map<string, GeAttrValue> attrs_;
bool has_init_{false};
bool host_node_{false};
bool anchor_status_updated_{false};

@ -22,10 +22,8 @@
template <class E, class O>
class RangeVistor {
public:
/*lint -e151*/
using Iterator = typename std::vector<E>::iterator;
using ConstIterator = typename std::vector<E>::const_iterator;
/*lint +e151*/
RangeVistor(O owner, const std::vector<E> &vs) : owner_(owner), elements_(vs) {}
@ -43,9 +41,7 @@ class RangeVistor {
bool empty() const { return elements_.empty(); }
/*lint -e659*/
E &at(std::size_t index) { return elements_.at(index); }
/*lint +e659*/
const E &at(std::size_t index) const { return elements_.at(index); }

@ -33,8 +33,7 @@ using std::vector;
namespace ge {
NamedAttrs::NamedAttrs() { named_attrs_.InitDefault(); }
NamedAttrs::NamedAttrs(const ProtoMsgOwner &owner, proto::NamedAttrs *proto_msg)
: named_attrs_(owner, proto_msg) {} // lint !e1744
NamedAttrs::NamedAttrs(const ProtoMsgOwner &owner, proto::NamedAttrs *proto_msg) : named_attrs_(owner, proto_msg) {}
void NamedAttrs::SetName(const std::string &name) {
auto proto_msg = named_attrs_.GetProtoMsg();
@ -239,7 +238,7 @@ ATTR_VALUE_SET_GET_IMP(GeAttrValue::STR)
ATTR_VALUE_SET_GET_IMP(vector<GeAttrValue::STR>)
ATTR_VALUE_SET_GET_IMP(GeAttrValue::INT)
ATTR_VALUE_SET_GET_IMP(vector<GeAttrValue::INT>)
ATTR_VALUE_SET_GET_IMP(GeAttrValue::FLOAT) // lint !e524
ATTR_VALUE_SET_GET_IMP(GeAttrValue::FLOAT)
ATTR_VALUE_SET_GET_IMP(vector<GeAttrValue::FLOAT>)
ATTR_VALUE_SET_GET_IMP(GeAttrValue::BOOL)
ATTR_VALUE_SET_GET_IMP(vector<GeAttrValue::BOOL>)
@ -253,11 +252,9 @@ ATTR_VALUE_SET_GET_IMP(GeAttrValue::BYTES)
ATTR_VALUE_SET_GET_IMP(vector<GeAttrValue::BYTES>)
ATTR_VALUE_SET_GET_IMP(GeAttrValue::NAMED_ATTRS)
ATTR_VALUE_SET_GET_IMP(vector<GeAttrValue::NAMED_ATTRS>)
/*lint -e665*/
ATTR_VALUE_SET_GET_IMP(vector<vector<int64_t>>)
/*lint +e665*/
ATTR_VALUE_SET_GET_IMP(vector<DataType>) // lint !e665
ATTR_VALUE_SET_GET_IMP(GeAttrValue::DATA_TYPE) // lint !e665
ATTR_VALUE_SET_GET_IMP(vector<DataType>)
ATTR_VALUE_SET_GET_IMP(GeAttrValue::DATA_TYPE)
#undef ATTR_VALUE_SET_GET_IMP
@ -785,14 +782,14 @@ bool GeAttrValueImp::GetValue(const proto::AttrDef &proto_attr_val, const ProtoM
if (graph_def == nullptr) {
GELOGE(GRAPH_FAILED, "proto::GraphDef make shared failed");
graph_def = nullptr;
return false; // lint !e665
return false;
} else {
ModelSerializeImp imp;
imp.SetProtobufOwner(graph_def);
if (!imp.UnserializeGraph(graph, *graph_def)) {
GELOGE(GRAPH_FAILED, "UnserializeGraph Failed");
return false;
} // lint !e514
}
value = graph;
}
return true;
@ -812,7 +809,7 @@ bool GeAttrValueImp::GetValue(const proto::AttrDef &proto_attr_val, const ProtoM
if (graph_def == nullptr) {
GELOGE(GRAPH_FAILED, "proto::GraphDef make shared failed");
graph_def = nullptr;
return false; // lint !e665
return false;
} else {
ComputeGraphPtr graph = nullptr;
ModelSerializeImp imp;
@ -820,7 +817,7 @@ bool GeAttrValueImp::GetValue(const proto::AttrDef &proto_attr_val, const ProtoM
if (!imp.UnserializeGraph(graph, *graph_def)) {
GELOGE(GRAPH_FAILED, "UnserializeGraph Failed");
return false;
} // lint !e514
}
value.push_back(graph);
}
}
@ -972,9 +969,7 @@ ATTR_UTILS_SET_IMP(Tensor, GeTensor)
ATTR_UTILS_SET_GET_IMP(NamedAttrs, GeAttrValue::NAMED_ATTRS)
ATTR_UTILS_SET_GET_IMP(Bytes, Buffer)
ATTR_UTILS_SET_GET_IMP(Graph, ComputeGraphPtr)
/*lint -e665*/
ATTR_UTILS_SET_GET_IMP(ListListInt, vector<vector<int64_t>>)
/*lint +e665*/
ATTR_UTILS_SET_GET_IMP(ListInt, vector<int64_t>)
ATTR_UTILS_SET_IMP(ListInt, vector<int32_t>)
@ -989,8 +984,8 @@ ATTR_UTILS_SET_IMP(ListTensor, vector<GeTensor>)
ATTR_UTILS_SET_GET_IMP(ListNamedAttrs, vector<GeAttrValue::NAMED_ATTRS>)
ATTR_UTILS_SET_GET_IMP(ListBytes, vector<Buffer>)
ATTR_UTILS_SET_GET_IMP(ListGraph, vector<ComputeGraphPtr>)
ATTR_UTILS_SET_GET_IMP(ListDataType, vector<ge::DataType>) // lint !e665
ATTR_UTILS_SET_GET_IMP(DataType, ge::DataType) // lint !e665
ATTR_UTILS_SET_GET_IMP(ListDataType, vector<ge::DataType>)
ATTR_UTILS_SET_GET_IMP(DataType, ge::DataType)
bool AttrUtils::SetListTensor(AttrHolderAdapter &&obj, const string &name,
std::initializer_list<ConstGeTensorPtr> &&value) {
@ -1159,7 +1154,7 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY bool AttrUtils::GetListOpDesc(Con
}
for (const auto &item : bytes_vals) {
ModelSerialize serialize;
auto op_desc = serialize.UnserializeOpDesc(item.GetData(), item.GetSize()); // lint !e732
auto op_desc = serialize.UnserializeOpDesc(item.GetData(), item.GetSize());
value.push_back(op_desc);
}
return true;
@ -1211,7 +1206,7 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY OpDescPtr AttrUtils::CloneOpDesc(
op_def = ComGraphMakeShared<proto::OpDef>();
if (op_def == nullptr) {
GELOGE(GRAPH_FAILED, "proto::OpDef make shared failed");
return nullptr; // lint !e665
return nullptr;
}
ModelSerializeImp imp;
(void)imp.SerializeOpDesc(org_op_desc, op_def.get());

@ -409,13 +409,13 @@ bool ModelSerializeImp::HandleNodeNameRef() {
item.dst_node_name.c_str(), item.dst_in_index);
return false;
}
GE_CHK_BOOL_ONLY_LOG((src_anchor->LinkTo(dst_anchor) == GRAPH_SUCCESS), " linkTo failed."); // lint !e737
GE_CHK_BOOL_ONLY_LOG((src_anchor->LinkTo(dst_anchor) == GRAPH_SUCCESS), " linkTo failed.");
} else {
// Control edge
auto src_anchor = src_node_it->second->GetOutControlAnchor();
auto dst_anchor = item.dst_node->GetInControlAnchor();
if (src_anchor != nullptr && dst_anchor != nullptr) {
GE_CHK_BOOL_ONLY_LOG((src_anchor->LinkTo(dst_anchor) == GRAPH_SUCCESS), " linkTo failed."); // lint !e737
GE_CHK_BOOL_ONLY_LOG((src_anchor->LinkTo(dst_anchor) == GRAPH_SUCCESS), " linkTo failed.");
}
}
}

@ -33,7 +33,6 @@ using std::shared_ptr;
using std::string;
using std::vector;
/*lint -save -e521 -e681 -e732 -e737*/
namespace ge {
const std::string ATTR_NAME_ID = "id";

@ -56,9 +56,6 @@ using std::string;
using std::to_string;
using std::vector;
/*lint -save -e529 -e728*/
/*lint -e446 -e732*/
/*lint -e665*/
namespace ge {
class OpIO {
public:
@ -943,7 +940,7 @@ OperatorImplPtr Operator::GetOperatorImplPtr() const { return operator_impl_; }
GELOGW("set attr name %s failed.", name.c_str()); \
} \
return *this; \
} // lint !e665
}
#define OP_ATTR_GET_IMP(ArgType, AttrUtilsFun) \
graphStatus Operator::GetAttr(const string &name, ArgType attr_value) const { \
@ -956,7 +953,7 @@ OperatorImplPtr Operator::GetOperatorImplPtr() const { return operator_impl_; }
return GRAPH_FAILED; \
} \
return GRAPH_SUCCESS; \
} // lint !e665
}
void Operator::BreakConnect() const {
if (operator_impl_ == nullptr) {
@ -977,7 +974,7 @@ void Operator::BreakConnect() const {
if (!AttrUtils::Set##AttrUtilsFun(operator_impl_->GetOpDescImpl(), name, attr_value)) { \
GELOGW("reg attr name %s failed.", name.c_str()); \
} \
} // lint !e665
}
OP_ATTR_SET_IMP(int64_t, Int)
OP_ATTR_SET_IMP(int32_t, Int)
@ -998,22 +995,22 @@ OP_ATTR_SET_IMP(const vector<vector<int64_t>> &, ListListInt)
OP_ATTR_SET_IMP(float, Float)
OP_ATTR_GET_IMP(float &, Float)
OP_ATTR_SET_IMP(const vector<float> &, ListFloat)
OP_ATTR_GET_IMP(vector<float> &, ListFloat) // lint !e665
OP_ATTR_GET_IMP(vector<float> &, ListFloat)
OP_ATTR_SET_IMP(bool, Bool)
OP_ATTR_GET_IMP(bool &, Bool)
OP_ATTR_SET_IMP(const vector<bool> &, ListBool)
OP_ATTR_GET_IMP(vector<bool> &, ListBool) // lint !e665
OP_ATTR_GET_IMP(vector<bool> &, ListBool)
OP_ATTR_SET_IMP(const string &, Str)
OP_ATTR_GET_IMP(string &, Str)
OP_ATTR_SET_IMP(const vector<string> &, ListStr)
OP_ATTR_GET_IMP(vector<string> &, ListStr) // lint !e665
OP_ATTR_GET_IMP(vector<string> &, ListStr)
OP_ATTR_SET_IMP(const GeAttrValue::NAMED_ATTRS &, NamedAttrs)
OP_ATTR_GET_IMP(GeAttrValue::NAMED_ATTRS &, NamedAttrs)
OP_ATTR_SET_IMP(const vector<GeAttrValue::NAMED_ATTRS> &, ListNamedAttrs)
OP_ATTR_GET_IMP(vector<GeAttrValue::NAMED_ATTRS> &, ListNamedAttrs) // lint !e665
OP_ATTR_GET_IMP(vector<GeAttrValue::NAMED_ATTRS> &, ListNamedAttrs)
OP_ATTR_REG_IMP(int64_t, Int)
OP_ATTR_REG_IMP(const vector<int64_t> &, ListInt)
@ -1583,5 +1580,3 @@ void GraphUtils::BreakConnect(const std::map<OperatorImplPtr, NodePtr> &all_node
}
}
} // namespace ge
/*lint +e446 +e732*/
/*lint +e665*/

@ -38,9 +38,7 @@ bool OpsProtoManager::Initialize(const std::map<std::string, std::string> &optio
return true;
}
/*lint -e1561*/
auto proto_iter = options.find("ge.opsProtoLibPath");
/*lint +e1561*/
if (proto_iter == options.end()) {
GELOGW("ge.opsProtoLibPath option not set, return.");
return false;

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save