forked from huawei/mindspore2022
fix static check problems
This commit is contained in:
parent
eb4749642d
commit
78611b5d5b
|
|
@ -507,6 +507,5 @@ struct TraceProviderRegister {
|
|||
}
|
||||
~TraceProviderRegister() = default;
|
||||
} trace_provider_regsiter;
|
||||
|
||||
} // namespace trace
|
||||
} // namespace mindspore
|
||||
|
|
|
|||
|
|
@ -162,9 +162,9 @@ TypeId GetMaxTypeId(const abstract::AbstractBasePtrList &args_spec_list, std::ve
|
|||
}
|
||||
|
||||
// Get the largest type of index in the same SignatureEnumDType of arguments.
|
||||
std::map<SignatureEnumDType, TypeId> GetMaxDtype(const std::vector<SignatureEnumDType> &dtypes,
|
||||
const abstract::AbstractBasePtrList &args_spec_list,
|
||||
const std::set<size_t> &write_indices) {
|
||||
using MaxTypeMap = std::map<SignatureEnumDType, TypeId>;
|
||||
MaxTypeMap GetMaxDtype(const std::vector<SignatureEnumDType> &dtypes,
|
||||
const abstract::AbstractBasePtrList &args_spec_list, const std::set<size_t> &write_indices) {
|
||||
// record index for signature.dtypes of the same type
|
||||
// eg. [T, T1, T, T2, T, T1, T3] -> {{T:(0,2,4)}, {T1:(1,5)}, {T2:(3)}, {T3:(6)}}
|
||||
std::map<SignatureEnumDType, std::vector<size_t>> type_indices;
|
||||
|
|
|
|||
|
|
@ -24,12 +24,10 @@
|
|||
namespace mindspore {
|
||||
/* namespace to support opt */
|
||||
namespace opt {
|
||||
|
||||
bool GraphKernelReuse::CompareNode(const AnfNodePtr a, const AnfNodePtr b) {
|
||||
if (a->abstract() && b->abstract()) {
|
||||
auto a_type = a->abstract()->GetTypeTrack();
|
||||
auto b_type = b->abstract()->GetTypeTrack();
|
||||
|
||||
if (a_type != b_type) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -132,7 +130,6 @@ bool GraphKernelReuse::DoReplace(const FuncGraphManagerPtr manager) {
|
|||
manager->Replace(iter.first->first, new_cnode);
|
||||
changed = true;
|
||||
}
|
||||
|
||||
} else {
|
||||
// Add current fg to map
|
||||
graph_kernel_ops[key].push_back(fg);
|
||||
|
|
@ -152,6 +149,5 @@ bool GraphKernelReuse::ReuseGraphKernel(const FuncGraphPtr root, const FuncGraph
|
|||
|
||||
return DoReplace(manager);
|
||||
}
|
||||
|
||||
} // namespace opt
|
||||
} // namespace mindspore
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
namespace mindspore {
|
||||
namespace opt {
|
||||
|
||||
// Common subexpression elimination.
|
||||
class GraphKernelReuse {
|
||||
public:
|
||||
|
|
@ -46,7 +45,6 @@ class GraphKernelReuse {
|
|||
std::unordered_map<std::string, std::vector<FuncGraphPtr>> graph_kernel_ops;
|
||||
int count;
|
||||
};
|
||||
|
||||
} // namespace opt
|
||||
} // namespace mindspore
|
||||
#endif // MINDSPORE_CCSRC_FRONTEND_OPTIMIZER_GRAPH_KERNEL_OP_REUSE_H
|
||||
|
|
|
|||
|
|
@ -147,7 +147,6 @@ void AdjustAllReduceMulAdd::ProcessDependEdge(const FuncGraphPtr &fg, const AnfN
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace irpass
|
||||
} // namespace opt
|
||||
} // namespace mindspore
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ class ArithmeticSimplify2 : public OptimizerCaller {
|
|||
public:
|
||||
AnfNodePtr operator()(const OptimizerPtr &, const AnfNodePtr &node) override;
|
||||
};
|
||||
|
||||
} // namespace irpass
|
||||
} // namespace opt
|
||||
} // namespace mindspore
|
||||
|
|
|
|||
|
|
@ -141,7 +141,6 @@ class ConvertSwitchReplacement : public OptimizerCaller {
|
|||
return nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace irpass
|
||||
} // namespace opt
|
||||
} // namespace mindspore
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
namespace mindspore {
|
||||
namespace opt {
|
||||
namespace irpass {
|
||||
|
||||
static int count = 0;
|
||||
|
||||
std::string GetFusionNumber() {
|
||||
|
|
@ -79,7 +78,6 @@ class MarkInterfaceFusion : public AnfVisitor {
|
|||
private:
|
||||
AnfNodePtr y_{nullptr};
|
||||
};
|
||||
|
||||
} // namespace irpass
|
||||
} // namespace opt
|
||||
} // namespace mindspore
|
||||
|
|
|
|||
|
|
@ -203,7 +203,6 @@ class DependValueElim : public OptimizerCaller {
|
|||
return nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace irpass
|
||||
} // namespace opt
|
||||
} // namespace mindspore
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@
|
|||
namespace mindspore {
|
||||
namespace opt {
|
||||
namespace irpass {
|
||||
|
||||
const char PARSE_SUPER_NAME[] = "namespace";
|
||||
|
||||
// {prim::kPrimResolve, Ns, Sym}
|
||||
|
|
@ -108,7 +107,6 @@ class ResolveAttr : public OptimizerCaller {
|
|||
|
||||
auto ns_ = GetValueNode<parse::NameSpacePtr>(ns_node.GetNode(node));
|
||||
auto sym_ = GetValueNode<parse::SymbolPtr>(sym_node.GetNode(node));
|
||||
|
||||
if (ns_->module() == parse::RESOLVE_NAMESPACE_NAME_CLASS_MEMBER && sym_->symbol() != PARSE_SUPER_NAME) {
|
||||
// deal with the case of getting attr from a class member
|
||||
// and avoid the case of getting attr from self (the result of ParseSuper)
|
||||
|
|
|
|||
|
|
@ -122,7 +122,6 @@ AnfNodePtr ValueBasedEliminate::operator()(const OptimizerPtr &, const AnfNodePt
|
|||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
} // namespace irpass
|
||||
} // namespace opt
|
||||
} // namespace mindspore
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
namespace mindspore {
|
||||
namespace opt {
|
||||
namespace irpass {
|
||||
|
||||
// {prim::kPrimSelect, {prim::kPrimGreater, X, 0}, Y, Z}} -> Y when X is always greater than 0
|
||||
// {prim::kPrimMaximum, X, Y} -> X when Y is smaller than LOWER_FLT_LIMIT
|
||||
// {prim::kPrimMinimum, X, Y} -> X when Y is greater than UPPER_FLT_LIMIT
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@ bool PassGroup::Run(const FuncGraphPtr &func_graph) const {
|
|||
}
|
||||
return changed;
|
||||
}
|
||||
|
||||
} // namespace python_pass
|
||||
} // namespace opt
|
||||
} // namespace mindspore
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ using PatternNodeMap = std::unordered_map<PatternPtr, AnfNodePtr, PatternHasher,
|
|||
class Pattern : public Base {
|
||||
public:
|
||||
Pattern() : unique_name_(std::to_string(g_id_++)) {}
|
||||
~Pattern() = default;
|
||||
virtual MatchResultPtr match(const AnfNodePtr &node) { return nullptr; }
|
||||
virtual bool operator==(const Pattern &other) const { return unique_name_ == other.unique_name_; }
|
||||
string unique_name() const { return unique_name_; }
|
||||
|
|
@ -82,6 +83,7 @@ struct PatternHasher {
|
|||
class IsPrimTypeOf : public Pattern {
|
||||
public:
|
||||
IsPrimTypeOf() { unique_name_ = std::to_string(g_id_++); }
|
||||
~IsPrimTypeOf() = default;
|
||||
IsPrimTypeOf(vector<PrimitivePyPtr> prims, string name, bool should_replace)
|
||||
: primitives_(prims), name_(name), matched_prim_(nullptr) {
|
||||
unique_name_ = std::to_string(g_id_++) + "_" + name;
|
||||
|
|
@ -120,6 +122,7 @@ class IsPrimTypeOf : public Pattern {
|
|||
class CallWith : public Pattern {
|
||||
public:
|
||||
CallWith() { unique_name_ = std::to_string(g_id_++); }
|
||||
~CallWith() = default;
|
||||
CallWith(PatternPtr prim_pattern, vector<PatternPtr> inputs, bool should_replace) {
|
||||
// NOTE: should_replace is ignored in this case, since each sub-pattern has its own setting
|
||||
prim_pattern_ = prim_pattern;
|
||||
|
|
@ -154,6 +157,7 @@ class CallWith : public Pattern {
|
|||
class IsIn : public Pattern {
|
||||
public:
|
||||
IsIn() { unique_name_ = std::to_string(g_id_++); }
|
||||
~IsIn() = default;
|
||||
explicit IsIn(vector<PatternPtr> patterns) : patterns_(patterns) {
|
||||
unique_name_ = std::to_string(g_id_++);
|
||||
for (auto &iter : patterns) {
|
||||
|
|
@ -170,6 +174,7 @@ class IsIn : public Pattern {
|
|||
class IsNot : public Pattern {
|
||||
public:
|
||||
IsNot() { unique_name_ = std::to_string(g_id_++); }
|
||||
~IsNot() = default;
|
||||
explicit IsNot(vector<PatternPtr> patterns) : patterns_(patterns) {
|
||||
unique_name_ = std::to_string(g_id_++);
|
||||
for (auto &iter : patterns) {
|
||||
|
|
@ -186,6 +191,7 @@ class IsNot : public Pattern {
|
|||
class AnyPattern : public Pattern {
|
||||
public:
|
||||
AnyPattern() { unique_name_ = std::to_string(g_id_++) + "_AnyPattern"; }
|
||||
~AnyPattern() = default;
|
||||
MS_DECLARE_PARENT(AnyPattern, Pattern);
|
||||
MatchResultPtr match(const AnfNodePtr &node) override;
|
||||
};
|
||||
|
|
@ -193,6 +199,7 @@ class AnyPattern : public Pattern {
|
|||
class NewTensor : public Pattern {
|
||||
public:
|
||||
NewTensor() { unique_name_ = std::to_string(g_id_++); }
|
||||
~NewTensor() = default;
|
||||
explicit NewTensor(tensor::TensorPtr input_tensor) : input_tensor_(input_tensor) { should_replace_ = false; }
|
||||
MS_DECLARE_PARENT(NewTensor, Pattern);
|
||||
MatchResultPtr match(const AnfNodePtr &node) override {
|
||||
|
|
@ -207,6 +214,7 @@ class NewTensor : public Pattern {
|
|||
class MatchResult {
|
||||
public:
|
||||
MatchResult() {}
|
||||
~MatchResult() = default;
|
||||
void add_entry(PatternPtr pattern, AnfNodePtr node) { match_result_[pattern] = node; }
|
||||
PatternNodeMap _result() { return match_result_; }
|
||||
AnfNodePtr get_node(const PatternPtr &pattern);
|
||||
|
|
|
|||
|
|
@ -386,6 +386,5 @@ static inline uint64_t GetCurrentUSec() {
|
|||
do { \
|
||||
MS_LOG(INFO) << #stage << " called " << count_##stage << " times, costs " << total_##stage << " usec."; \
|
||||
} while (0)
|
||||
|
||||
} // namespace mindspore
|
||||
#endif // MINDSPORE_CCSRC_UTILS_UTILS_H_
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ void MsBackend::Link(GraphId graph_id) {
|
|||
Backend::Backend(const std::string &name) : name_(name) {
|
||||
MS_LOG(DEBUG) << "select backend:" << name;
|
||||
convert_fn_ = backends[name_];
|
||||
is_multi_graph_sink_ = false;
|
||||
}
|
||||
|
||||
MsBackend::MsBackend(const std::string &name, const std::string &target, uint32_t device_id) : Backend(name) {
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ AnfNodePtrList GetOutput(const AnfNodePtrList &lst, const NodeUsersMap &users, c
|
|||
}
|
||||
|
||||
namespace {
|
||||
AnfNodePtr RefSubGraphNode(const FuncGraphPtr &fg, const AnfNodePtr &node, AnfNodePtrList *inputs_ptr,
|
||||
AnfNodePtr RefSubGraphNode(const FuncGraphPtr &fg, const AnfNodePtr &node, AnfNodePtrList *const inputs_ptr,
|
||||
AnfNodePtrToAnfNodePtrMap *eqv_ptr) {
|
||||
MS_EXCEPTION_IF_NULL(fg);
|
||||
MS_EXCEPTION_IF_NULL(inputs_ptr);
|
||||
|
|
|
|||
|
|
@ -215,7 +215,6 @@ AbstractBasePtr InferImplDictGetItem(const AnalysisEnginePtr &, const PrimitiveP
|
|||
std::vector<AbstractAttribute> dict_elems = dict->elements();
|
||||
auto it = std::find_if(dict_elems.begin(), dict_elems.end(),
|
||||
[key_str](const AbstractAttribute &item) { return item.first == key_str; });
|
||||
|
||||
if (it == dict_elems.end()) {
|
||||
MS_LOG(EXCEPTION) << "The key " << key_str << " does not exist in the dict:" << args_spec_list[0]->ToString();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ namespace mindspore {
|
|||
class Conv2d : public PrimitiveC {
|
||||
public:
|
||||
Conv2d();
|
||||
~Conv2d() = default;
|
||||
void Init(int out_channel, const std::vector<int> &kernel_size, int mode = 1, const std::string &pad_mode = "valid",
|
||||
const std::vector<int> &pad = {0, 0, 0, 0}, const std::vector<int> &stride = {1, 1, 1, 1},
|
||||
const std::vector<int> &dilation = {1, 1, 1, 1}, int group = 1);
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ namespace mindspore {
|
|||
class PrimitiveC : public Primitive {
|
||||
public:
|
||||
explicit PrimitiveC(const std::string &name) : Primitive(name) {}
|
||||
~PrimitiveC() = default;
|
||||
AbstractBasePtr Infer(const AbstractBasePtrList &abstract_list);
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -23,10 +23,8 @@
|
|||
#include "base/base.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
||||
struct TypeIdManager *TypeIdManager::Get() {
|
||||
static TypeIdManager manager;
|
||||
return &manager;
|
||||
}
|
||||
|
||||
} // namespace mindspore
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@
|
|||
#include "utils/label.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
||||
enum IncludeType { FOLLOW, NOFOLLOW, EXCLUDE };
|
||||
|
||||
using IncludeFunc = std::function<IncludeType(const AnfNodePtr &)>;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
// namespace to support intermediate representation definition
|
||||
namespace mindspore {
|
||||
|
||||
abstract::AbstractBasePtr MetaFuncGraph::ToAbstract() {
|
||||
return std::make_shared<abstract::MetaFuncGraphAbstractClosure>(shared_from_base<MetaFuncGraph>());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -579,7 +579,6 @@ class PConstant : public PBase<PConstant<T> > {
|
|||
if (!node->isa<ValueNode>()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto value = node->cast<ValueNodePtr>()->value();
|
||||
|
||||
if (!value->isa<tensor::Tensor>()) {
|
||||
|
|
@ -622,7 +621,6 @@ class PConstant : public PBase<PConstant<T> > {
|
|||
}
|
||||
auto x_abstract = x->abstract()->cast<abstract::AbstractTensorPtr>();
|
||||
std::vector<int> x_shape = x_abstract->shape()->shape();
|
||||
|
||||
if (x_shape != tensor_shape) {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
@ -638,7 +636,6 @@ class PConstant : public PBase<PConstant<T> > {
|
|||
}
|
||||
|
||||
auto x_tensor_ptr = dyn_cast<tensor::Tensor>(x_value);
|
||||
|
||||
if ((x_tensor_ptr->DataSize() > 1) && (x_tensor_ptr->DataSize() != new_tensor_ptr->DataSize())) {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
@ -729,7 +726,6 @@ class PConstant : public PBase<PConstant<T> > {
|
|||
|
||||
auto value_1 = GetValueNode(vnode_1);
|
||||
auto value_2 = GetValueNode(vnode_2);
|
||||
|
||||
if (!value_1->isa<tensor::Tensor>() || !value_2->isa<tensor::Tensor>()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
@ -744,14 +740,12 @@ class PConstant : public PBase<PConstant<T> > {
|
|||
TypePtr tensor_1_type_ptr = tensor_1_abstract->element()->BuildType();
|
||||
TypePtr tensor_2_type_ptr = tensor_2_abstract->element()->BuildType();
|
||||
TypePtr tensor_3_type_ptr = tensor_3_abstract->element()->BuildType();
|
||||
|
||||
if ((tensor_1_type_ptr->type_id() != tensor_3_type_ptr->type_id()) ||
|
||||
(tensor_2_type_ptr->type_id() != tensor_3_type_ptr->type_id())) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::vector<int> tensor_out_shape = tensor_3_abstract->shape()->shape();
|
||||
|
||||
int data_out_size = std::accumulate(tensor_out_shape.begin(), tensor_out_shape.end(), 1, std::multiplies<int>());
|
||||
|
||||
if ((tensor_ptr_1->DataSize() > 1) && (tensor_ptr_1->DataSize() != data_out_size)) {
|
||||
|
|
@ -872,7 +866,6 @@ BIN_OPERATION_PATTERN(operator*, prim::kPrimMul, true);
|
|||
return rep; \
|
||||
} \
|
||||
}
|
||||
|
||||
} // namespace mindspore
|
||||
|
||||
#endif // MINDSPORE_CORE_IR_PATTERN_MATCHER_H_
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
#include "abstract/abstract_function.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
||||
static std::string MakeId() {
|
||||
// Use atomic to make id generator thread safe.
|
||||
static std::atomic<uint64_t> last_id{1};
|
||||
|
|
@ -44,6 +43,7 @@ Primitive::Primitive(const Primitive &prim)
|
|||
has_signature_(prim.has_signature_),
|
||||
prim_type_(prim.prim_type_),
|
||||
record_evaluate_add_attr_(false),
|
||||
is_const_value_(false),
|
||||
id_(prim.id_) {}
|
||||
|
||||
abstract::AbstractBasePtr Primitive::ToAbstract() {
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ std::unique_ptr<T[]> NewData(Scalar scalar) {
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
std::unique_ptr<T[]> CopyData(const std::vector<int> &shape, void *data, TypeId data_type) {
|
||||
std::unique_ptr<T[]> CopyData(const std::vector<int> &shape, void *const data, TypeId data_type) {
|
||||
const size_t size = SizeOf(shape);
|
||||
switch (data_type) {
|
||||
case kNumberTypeBool:
|
||||
|
|
@ -136,7 +136,7 @@ std::unique_ptr<T[]> CopyData(const std::vector<int> &shape, void *data, TypeId
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
std::unique_ptr<T[]> CopyData(const std::vector<int> &shape, void *data, size_t data_len) {
|
||||
std::unique_ptr<T[]> CopyData(const std::vector<int> &shape, void *const data, size_t data_len) {
|
||||
size_t size = SizeOf(shape);
|
||||
if (size * sizeof(T) != data_len) {
|
||||
MS_LOG(EXCEPTION) << "Incorrect tensor input data length " << data_len << ", expect " << size * sizeof(T)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@
|
|||
#include <memory>
|
||||
|
||||
namespace mindspore {
|
||||
|
||||
// only support (int, float, bool) as Literal
|
||||
bool AnyIsLiteral(const Any &any) {
|
||||
static const std::type_index typeid_int = std::type_index(typeid(int));
|
||||
|
|
@ -53,5 +52,4 @@ Any &Any::operator=(Any &&other) {
|
|||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
} // namespace mindspore
|
||||
|
|
|
|||
|
|
@ -208,7 +208,6 @@ struct AnyLess {
|
|||
};
|
||||
|
||||
bool AnyIsLiteral(const Any &any);
|
||||
|
||||
} // namespace mindspore
|
||||
|
||||
#endif // MINDSPORE_CORE_UTILS_ANY_H_
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
#include "utils/ordered_map.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
||||
template <typename T, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
|
||||
class Counter {
|
||||
using counter_type = Counter<T, Hash, Equal>;
|
||||
|
|
|
|||
|
|
@ -395,7 +395,6 @@ class LogConfigParser {
|
|||
bool flag_error = false;
|
||||
std::string text;
|
||||
auto tok = lexer.GetNext(&text);
|
||||
|
||||
// empty string
|
||||
if (tok == LogConfigToken::EOS) {
|
||||
return log_levels;
|
||||
|
|
|
|||
|
|
@ -33,6 +33,5 @@ extern const int RET_BREAK;
|
|||
|
||||
// demangle the name to make it human reablable.
|
||||
extern std::string demangle(const char *name);
|
||||
|
||||
} // namespace mindspore
|
||||
#endif // MINDSPORE_CORE_UTILS_MISC_H_
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
#include "utils/log_adapter.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
||||
// Implementation of OrderedSet that keeps insertion order
|
||||
// using map as set, and use list as a sequential container to record elements to keep insertion order
|
||||
template <class T, class Hash = std::hash<T>, class KeyEqual = std::equal_to<T>>
|
||||
|
|
@ -277,7 +276,6 @@ class OrderedSet {
|
|||
map_type mapped_data_;
|
||||
sequential_type ordered_data_;
|
||||
};
|
||||
|
||||
} // namespace mindspore
|
||||
|
||||
#endif // MINDSPORE_CORE_UTILS_ORDERED_SET_H_
|
||||
|
|
|
|||
|
|
@ -361,5 +361,4 @@ void MsProfile::Print() {
|
|||
(void)printf("\nTime group info:\n%s", text.c_str());
|
||||
(void)fflush(stdout);
|
||||
}
|
||||
|
||||
} // namespace mindspore
|
||||
|
|
|
|||
|
|
@ -221,7 +221,6 @@ class MsProfile {
|
|||
std::map<std::string, TimeStat> time_stat_; // record time and count info from some activity
|
||||
ProfileBase *profile_ = nullptr; // record hierarchical profile info
|
||||
};
|
||||
|
||||
} // namespace mindspore
|
||||
|
||||
#ifdef ENABLE_PROFILE
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
#include <memory>
|
||||
|
||||
namespace mindspore {
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, const std::shared_ptr<EnvInstance> &objPtr) {
|
||||
out << "(";
|
||||
MS_EXCEPTION_IF_NULL(objPtr);
|
||||
|
|
@ -50,5 +49,4 @@ bool EnvInstance::operator==(const Value &other) const {
|
|||
return false;
|
||||
}
|
||||
std::shared_ptr<EnvInstance> newenv = std::make_shared<EnvInstance>();
|
||||
|
||||
} // namespace mindspore
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@
|
|||
#include "abstract/abstract_value.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
||||
class SymbolicKeyInstance : public Value {
|
||||
public:
|
||||
SymbolicKeyInstance(const AnfNodePtr &node, const abstract::AbstractBasePtr &abstract)
|
||||
|
|
@ -168,7 +167,6 @@ class EnvInstance : public Value {
|
|||
using EnvInstancePtr = std::shared_ptr<EnvInstance>;
|
||||
|
||||
extern std::shared_ptr<EnvInstance> newenv;
|
||||
|
||||
} // namespace mindspore
|
||||
|
||||
#endif // MINDSPORE_CORE_UTILS_SYMBOLIC_H_
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ namespace mindspore {
|
|||
#define MS_EXPORT __attribute__((visibility("default")))
|
||||
#define MS_LOCAL __attribute__((visibility("hidden")))
|
||||
#endif
|
||||
|
||||
} // namespace mindspore
|
||||
|
||||
#endif // MINDSPORE_CORE_UTILS_VISIBLE_H_
|
||||
|
|
|
|||
Loading…
Reference in New Issue