Browse Source

!4396 Fix static check problems

Merge pull request !4396 from Kang/opt
tags/v0.7.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
6b120584c2
37 changed files with 18 additions and 53 deletions
  1. +0
    -1
      mindspore/ccsrc/debug/trace.cc
  2. +3
    -3
      mindspore/ccsrc/frontend/operator/composite/do_signature.cc
  3. +0
    -4
      mindspore/ccsrc/frontend/optimizer/graph_kernel_reuse.cc
  4. +0
    -2
      mindspore/ccsrc/frontend/optimizer/graph_kernel_reuse.h
  5. +0
    -1
      mindspore/ccsrc/frontend/optimizer/irpass/arithmetic_simplify.cc
  6. +0
    -1
      mindspore/ccsrc/frontend/optimizer/irpass/arithmetic_simplify.h
  7. +0
    -1
      mindspore/ccsrc/frontend/optimizer/irpass/branch_culling.h
  8. +0
    -2
      mindspore/ccsrc/frontend/optimizer/irpass/mark_interface_fusion.h
  9. +0
    -1
      mindspore/ccsrc/frontend/optimizer/irpass/special_op_eliminate.h
  10. +0
    -2
      mindspore/ccsrc/frontend/optimizer/irpass/symbol_resolver.h
  11. +0
    -1
      mindspore/ccsrc/frontend/optimizer/irpass/value_based_eliminate.cc
  12. +0
    -1
      mindspore/ccsrc/frontend/optimizer/irpass/value_based_eliminate.h
  13. +0
    -1
      mindspore/ccsrc/frontend/optimizer/pass_group.cc
  14. +8
    -0
      mindspore/ccsrc/frontend/optimizer/pattern.h
  15. +0
    -1
      mindspore/ccsrc/utils/utils.h
  16. +1
    -0
      mindspore/ccsrc/vm/backend.cc
  17. +1
    -1
      mindspore/ccsrc/vm/segment_runner.cc
  18. +0
    -1
      mindspore/core/abstract/prim_structures.cc
  19. +1
    -0
      mindspore/core/c_ops/conv2d.h
  20. +1
    -0
      mindspore/core/c_ops/primitive_c.h
  21. +0
    -2
      mindspore/core/gvar/typeid_manager.cc
  22. +0
    -1
      mindspore/core/ir/graph_utils.h
  23. +0
    -1
      mindspore/core/ir/meta_func_graph.cc
  24. +0
    -7
      mindspore/core/ir/pattern_matcher.h
  25. +1
    -1
      mindspore/core/ir/primitive.cc
  26. +2
    -2
      mindspore/core/ir/tensor.cc
  27. +0
    -2
      mindspore/core/utils/any.cc
  28. +0
    -1
      mindspore/core/utils/any.h
  29. +0
    -1
      mindspore/core/utils/counter.h
  30. +0
    -1
      mindspore/core/utils/log_adapter.cc
  31. +0
    -1
      mindspore/core/utils/misc.h
  32. +0
    -2
      mindspore/core/utils/ordered_set.h
  33. +0
    -1
      mindspore/core/utils/profile.cc
  34. +0
    -1
      mindspore/core/utils/profile.h
  35. +0
    -2
      mindspore/core/utils/symbolic.cc
  36. +0
    -2
      mindspore/core/utils/symbolic.h
  37. +0
    -1
      mindspore/core/utils/visible.h

+ 0
- 1
mindspore/ccsrc/debug/trace.cc View File

@@ -507,6 +507,5 @@ struct TraceProviderRegister {
}
~TraceProviderRegister() = default;
} trace_provider_regsiter;

} // namespace trace
} // namespace mindspore

+ 3
- 3
mindspore/ccsrc/frontend/operator/composite/do_signature.cc View File

@@ -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;


+ 0
- 4
mindspore/ccsrc/frontend/optimizer/graph_kernel_reuse.cc View File

@@ -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

+ 0
- 2
mindspore/ccsrc/frontend/optimizer/graph_kernel_reuse.h View File

@@ -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

+ 0
- 1
mindspore/ccsrc/frontend/optimizer/irpass/arithmetic_simplify.cc View File

@@ -147,7 +147,6 @@ void AdjustAllReduceMulAdd::ProcessDependEdge(const FuncGraphPtr &fg, const AnfN
}
}
}

} // namespace irpass
} // namespace opt
} // namespace mindspore

+ 0
- 1
mindspore/ccsrc/frontend/optimizer/irpass/arithmetic_simplify.h View File

@@ -62,7 +62,6 @@ class ArithmeticSimplify2 : public OptimizerCaller {
public:
AnfNodePtr operator()(const OptimizerPtr &, const AnfNodePtr &node) override;
};

} // namespace irpass
} // namespace opt
} // namespace mindspore


+ 0
- 1
mindspore/ccsrc/frontend/optimizer/irpass/branch_culling.h View File

@@ -141,7 +141,6 @@ class ConvertSwitchReplacement : public OptimizerCaller {
return nullptr;
}
};

} // namespace irpass
} // namespace opt
} // namespace mindspore


+ 0
- 2
mindspore/ccsrc/frontend/optimizer/irpass/mark_interface_fusion.h View File

@@ -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


+ 0
- 1
mindspore/ccsrc/frontend/optimizer/irpass/special_op_eliminate.h View File

@@ -203,7 +203,6 @@ class DependValueElim : public OptimizerCaller {
return nullptr;
}
};

} // namespace irpass
} // namespace opt
} // namespace mindspore


+ 0
- 2
mindspore/ccsrc/frontend/optimizer/irpass/symbol_resolver.h View File

@@ -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)


+ 0
- 1
mindspore/ccsrc/frontend/optimizer/irpass/value_based_eliminate.cc View File

@@ -122,7 +122,6 @@ AnfNodePtr ValueBasedEliminate::operator()(const OptimizerPtr &, const AnfNodePt

return nullptr;
}

} // namespace irpass
} // namespace opt
} // namespace mindspore

+ 0
- 1
mindspore/ccsrc/frontend/optimizer/irpass/value_based_eliminate.h View File

@@ -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


+ 0
- 1
mindspore/ccsrc/frontend/optimizer/pass_group.cc View File

@@ -63,7 +63,6 @@ bool PassGroup::Run(const FuncGraphPtr &func_graph) const {
}
return changed;
}

} // namespace python_pass
} // namespace opt
} // namespace mindspore

+ 8
- 0
mindspore/ccsrc/frontend/optimizer/pattern.h View File

@@ -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);


+ 0
- 1
mindspore/ccsrc/utils/utils.h View File

@@ -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_

+ 1
- 0
mindspore/ccsrc/vm/backend.cc View File

@@ -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) {


+ 1
- 1
mindspore/ccsrc/vm/segment_runner.cc View File

@@ -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);


+ 0
- 1
mindspore/core/abstract/prim_structures.cc View File

@@ -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();
}


+ 1
- 0
mindspore/core/c_ops/conv2d.h View File

@@ -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);


+ 1
- 0
mindspore/core/c_ops/primitive_c.h View File

@@ -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:


+ 0
- 2
mindspore/core/gvar/typeid_manager.cc View File

@@ -23,10 +23,8 @@
#include "base/base.h"

namespace mindspore {

struct TypeIdManager *TypeIdManager::Get() {
static TypeIdManager manager;
return &manager;
}

} // namespace mindspore

+ 0
- 1
mindspore/core/ir/graph_utils.h View File

@@ -35,7 +35,6 @@
#include "utils/label.h"

namespace mindspore {

enum IncludeType { FOLLOW, NOFOLLOW, EXCLUDE };

using IncludeFunc = std::function<IncludeType(const AnfNodePtr &)>;


+ 0
- 1
mindspore/core/ir/meta_func_graph.cc View File

@@ -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>());
}


+ 0
- 7
mindspore/core/ir/pattern_matcher.h View File

@@ -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_

+ 1
- 1
mindspore/core/ir/primitive.cc View File

@@ -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() {


+ 2
- 2
mindspore/core/ir/tensor.cc View File

@@ -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)


+ 0
- 2
mindspore/core/utils/any.cc View File

@@ -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

+ 0
- 1
mindspore/core/utils/any.h View File

@@ -208,7 +208,6 @@ struct AnyLess {
};

bool AnyIsLiteral(const Any &any);

} // namespace mindspore

#endif // MINDSPORE_CORE_UTILS_ANY_H_

+ 0
- 1
mindspore/core/utils/counter.h View File

@@ -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>;


+ 0
- 1
mindspore/core/utils/log_adapter.cc View File

@@ -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;


+ 0
- 1
mindspore/core/utils/misc.h View File

@@ -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_

+ 0
- 2
mindspore/core/utils/ordered_set.h View File

@@ -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_

+ 0
- 1
mindspore/core/utils/profile.cc View File

@@ -361,5 +361,4 @@ void MsProfile::Print() {
(void)printf("\nTime group info:\n%s", text.c_str());
(void)fflush(stdout);
}

} // namespace mindspore

+ 0
- 1
mindspore/core/utils/profile.h View File

@@ -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


+ 0
- 2
mindspore/core/utils/symbolic.cc View File

@@ -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

+ 0
- 2
mindspore/core/utils/symbolic.h View File

@@ -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_

+ 0
- 1
mindspore/core/utils/visible.h View File

@@ -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…
Cancel
Save