Browse Source

decoupling core and debug

tags/v0.7.0-beta
liubuyu 5 years ago
parent
commit
a499d4e47c
70 changed files with 112 additions and 124 deletions
  1. +1
    -1
      mindspore/ccsrc/backend/optimizer/pass/fuse_basic.cc
  2. +1
    -1
      mindspore/ccsrc/backend/optimizer/pass/fuse_graph_kernel.cc
  3. +1
    -1
      mindspore/ccsrc/backend/session/session_basic.cc
  4. +0
    -4
      mindspore/ccsrc/debug/CMakeLists.txt
  5. +1
    -1
      mindspore/ccsrc/debug/anf_ir_utils.cc
  6. +0
    -3
      mindspore/ccsrc/debug/draw.cc
  7. +2
    -2
      mindspore/ccsrc/debug/trace.h
  8. +2
    -2
      mindspore/ccsrc/frontend/optimizer/ad/dfunctor.cc
  9. +1
    -1
      mindspore/ccsrc/frontend/optimizer/ad/dfunctor.h
  10. +1
    -1
      mindspore/ccsrc/frontend/optimizer/ad/grad.cc
  11. +2
    -2
      mindspore/ccsrc/frontend/optimizer/ad/kprim.cc
  12. +1
    -1
      mindspore/ccsrc/frontend/optimizer/irpass/branch_culling.cc
  13. +1
    -1
      mindspore/ccsrc/frontend/optimizer/irpass/branch_culling.h
  14. +1
    -1
      mindspore/ccsrc/frontend/optimizer/irpass/env_item_eliminate.h
  15. +1
    -1
      mindspore/ccsrc/frontend/optimizer/irpass/grad_var_prepare.cc
  16. +1
    -1
      mindspore/ccsrc/frontend/optimizer/irpass/grad_var_prepare.h
  17. +1
    -1
      mindspore/ccsrc/frontend/optimizer/irpass/incorporate_call.h
  18. +1
    -1
      mindspore/ccsrc/frontend/optimizer/irpass/incorporate_getitem.h
  19. +1
    -1
      mindspore/ccsrc/frontend/optimizer/irpass/inline.h
  20. +1
    -1
      mindspore/ccsrc/frontend/optimizer/irpass/specialize_transform.h
  21. +1
    -1
      mindspore/ccsrc/frontend/parallel/context.h
  22. +1
    -1
      mindspore/ccsrc/pipeline/jit/action.cc
  23. +1
    -1
      mindspore/ccsrc/pipeline/jit/parse/data_converter.cc
  24. +1
    -1
      mindspore/ccsrc/pipeline/jit/parse/function_block.cc
  25. +1
    -1
      mindspore/ccsrc/pipeline/jit/pass.cc
  26. +1
    -1
      mindspore/ccsrc/pipeline/jit/static_analysis/evaluator.cc
  27. +1
    -1
      mindspore/ccsrc/pipeline/jit/static_analysis/program_specialize.h
  28. +1
    -1
      mindspore/ccsrc/pipeline/jit/static_analysis/static_analysis.cc
  29. +3
    -3
      mindspore/ccsrc/utils/primitive_py.h
  30. +3
    -3
      mindspore/ccsrc/utils/tensor_py.h
  31. +1
    -1
      mindspore/ccsrc/vm/segment_runner.cc
  32. +1
    -1
      mindspore/ccsrc/vm/vmimpl.cc
  33. +1
    -1
      mindspore/core/abstract/analysis_context.cc
  34. +3
    -4
      mindspore/core/base/base_ref_utils.h
  35. +1
    -1
      mindspore/core/ir/anf.h
  36. +0
    -1
      mindspore/core/ir/anf_extends.cc
  37. +1
    -1
      mindspore/core/ir/func_graph.cc
  38. +1
    -2
      mindspore/core/ir/func_graph.h
  39. +1
    -2
      mindspore/core/ir/func_graph_cloner.cc
  40. +4
    -3
      mindspore/core/ir/func_graph_cloner.h
  41. +1
    -2
      mindspore/core/ir/func_graph_extends.cc
  42. +0
    -1
      mindspore/core/ir/graph_utils.cc
  43. +4
    -4
      mindspore/core/ir/graph_utils.h
  44. +1
    -1
      mindspore/core/ir/graph_utils_extends.cc
  45. +3
    -3
      mindspore/core/utils/any.h
  46. +3
    -3
      mindspore/core/utils/convert_utils_base.h
  47. +3
    -3
      mindspore/core/utils/hashing.h
  48. +1
    -1
      mindspore/core/utils/info.cc
  49. +4
    -4
      mindspore/core/utils/info.h
  50. +2
    -2
      mindspore/core/utils/label.cc
  51. +0
    -0
      mindspore/core/utils/label.h
  52. +3
    -3
      mindspore/core/utils/log_adapter.h
  53. +3
    -3
      mindspore/core/utils/misc.h
  54. +3
    -3
      mindspore/core/utils/ordered_map.h
  55. +3
    -3
      mindspore/core/utils/ordered_set.h
  56. +3
    -3
      mindspore/core/utils/overload.h
  57. +3
    -3
      mindspore/core/utils/signal.h
  58. +3
    -3
      mindspore/core/utils/symbolic.h
  59. +1
    -1
      mindspore/core/utils/trace_base.cc
  60. +4
    -4
      mindspore/core/utils/trace_base.h
  61. +1
    -1
      mindspore/core/utils/trace_info.cc
  62. +3
    -3
      mindspore/core/utils/trace_info.h
  63. +3
    -3
      mindspore/core/utils/visible.h
  64. +1
    -1
      tests/ut/cpp/ir/clone_test.cc
  65. +2
    -2
      tests/ut/cpp/ir/manager_test.cc
  66. +1
    -1
      tests/ut/cpp/optimizer/ad/ad_test.cc
  67. +1
    -1
      tests/ut/cpp/optimizer/cconv_test.cc
  68. +1
    -1
      tests/ut/cpp/optimizer/lib_test.cc
  69. +1
    -1
      tests/ut/cpp/optimizer/opt_test.cc
  70. +1
    -1
      tests/ut/cpp/vm/segment_runner_test.cc

+ 1
- 1
mindspore/ccsrc/backend/optimizer/pass/fuse_basic.cc View File

@@ -32,7 +32,7 @@
#include "vm/segment_runner.h"
#include "debug/draw.h"
#include "debug/anf_ir_dump.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"

namespace mindspore {
namespace opt {


+ 1
- 1
mindspore/ccsrc/backend/optimizer/pass/fuse_graph_kernel.cc View File

@@ -33,7 +33,7 @@
#include "vm/segment_runner.h"
#include "debug/draw.h"
#include "debug/anf_ir_dump.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"

namespace mindspore {
namespace opt {


+ 1
- 1
mindspore/ccsrc/backend/session/session_basic.cc View File

@@ -33,7 +33,7 @@
#include "common/utils.h"
#include "ir/dtype.h"
#include "ir/anf.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#if (ENABLE_CPU && (ENABLE_D || ENABLE_GPU))
#include "frontend/parallel/ps/worker.h"
#include "frontend/parallel/ps/common.h"


+ 0
- 4
mindspore/ccsrc/debug/CMakeLists.txt View File

@@ -3,10 +3,6 @@ set(_DEBUG_SRC_LIST
"${CMAKE_CURRENT_SOURCE_DIR}/anf_ir_utils.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/draw.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/dump_proto.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/info.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/label.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/trace_info.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/trace_base.cc"
"${CMAKE_CURRENT_SOURCE_DIR}/trace.cc"
)



+ 1
- 1
mindspore/ccsrc/debug/anf_ir_utils.cc View File

@@ -36,7 +36,7 @@
#include "utils/ordered_set.h"
#include "utils/utils.h"
#include "debug/trace.h"
#include "debug/label.h"
#include "utils/label.h"
#include "utils/context/ms_context.h"
#include "frontend/operator/ops.h"



+ 0
- 3
mindspore/ccsrc/debug/draw.cc View File

@@ -23,7 +23,6 @@
#include <vector>
#include <string>

#include "pybind11/pybind11.h"
#include "ir/meta_func_graph.h"
#include "ir/param_value.h"
#include "ir/primitive.h"
@@ -32,8 +31,6 @@
#include "frontend/operator/composite/composite.h"
#include "ir/tensor.h"

namespace py = pybind11;

namespace mindspore {

// namespace to support debug utils


+ 2
- 2
mindspore/ccsrc/debug/trace.h View File

@@ -23,8 +23,8 @@
#include <utility>
#include <stack>

#include "debug/trace_base.h"
#include "debug/info.h"
#include "utils/trace_base.h"
#include "utils/info.h"
#include "ir/anf.h"
#include "ir/func_graph.h"
#include "pipeline/jit/static_analysis/static_analysis.h"


+ 2
- 2
mindspore/ccsrc/frontend/optimizer/ad/dfunctor.cc View File

@@ -22,8 +22,8 @@

#include "ir/anf.h"
#include "ir/meta_func_graph.h"
#include "debug/info.h"
#include "utils/func_graph_cloner.h"
#include "utils/info.h"
#include "ir/func_graph_cloner.h"
#include "ir/manager.h"
#include "pipeline/jit/resource.h"
#include "pipeline/jit/parse/parse.h"


+ 1
- 1
mindspore/ccsrc/frontend/optimizer/ad/dfunctor.h View File

@@ -27,7 +27,7 @@

#include "ir/anf.h"
#include "ir/meta_func_graph.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "pipeline/jit/resource.h"
#include "frontend/optimizer/ad/adjoint.h"
#include "frontend/operator/ops.h"


+ 1
- 1
mindspore/ccsrc/frontend/optimizer/ad/grad.cc View File

@@ -16,7 +16,7 @@

#include "frontend/optimizer/ad/grad.h"
#include "frontend/optimizer/ad/dfunctor.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "utils/context/ms_context.h"
#include "utils/symbolic.h"
#include "ir/graph_utils.h"


+ 2
- 2
mindspore/ccsrc/frontend/optimizer/ad/kprim.cc View File

@@ -22,7 +22,7 @@
#include "ir/anf.h"
#include "utils/primitive_py.h"
#include "ir/meta_func_graph.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "ir/manager.h"
#include "pipeline/jit/resource.h"
#include "pipeline/jit/parse/parse.h"
@@ -33,7 +33,7 @@
#include "utils/symbolic.h"
#include "utils/primitive_utils.h"
#include "utils/context/ms_context.h"
#include "debug/info.h"
#include "utils/info.h"
#include "debug/trace.h"

#include "./common.h"


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

@@ -21,7 +21,7 @@
#include <unordered_map>

#include "ir/func_graph.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "frontend/operator/ops.h"

namespace mindspore {


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

@@ -21,7 +21,7 @@
#include <algorithm>

#include "ir/func_graph.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "frontend/optimizer/optimizer_caller.h"
#include "ir/pattern_matcher.h"
#include "frontend/operator/ops.h"


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

@@ -24,7 +24,7 @@
#include <vector>

#include "ir/func_graph.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "frontend/optimizer/optimizer_caller.h"
#include "frontend/optimizer/anf_visitor.h"
#include "frontend/operator/ops.h"


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

@@ -26,7 +26,7 @@
#include "frontend/optimizer/optimizer.h"
#include "frontend/optimizer/anf_visitor.h"
#include "ir/func_graph.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"

namespace mindspore {
namespace opt {


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

@@ -28,7 +28,7 @@
#include "frontend/optimizer/optimizer.h"
#include "frontend/optimizer/anf_visitor.h"
#include "ir/func_graph.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"

namespace mindspore {
namespace opt {


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

@@ -26,7 +26,7 @@
#include "frontend/optimizer/optimizer.h"
#include "frontend/optimizer/anf_visitor.h"
#include "ir/func_graph.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "frontend/operator/ops.h"

namespace mindspore {


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

@@ -24,7 +24,7 @@
#include <vector>

#include "ir/func_graph.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "frontend/optimizer/optimizer_caller.h"
#include "frontend/optimizer/anf_visitor.h"
#include "frontend/operator/ops.h"


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

@@ -25,7 +25,7 @@
#include "frontend/optimizer/optimizer.h"
#include "frontend/optimizer/anf_visitor.h"
#include "ir/func_graph.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "frontend/operator/ops.h"

namespace mindspore {


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

@@ -29,7 +29,7 @@
#include "frontend/optimizer/anf_visitor.h"
#include "ir/manager.h"
#include "ir/func_graph.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "frontend/operator/ops.h"

namespace mindspore {


+ 1
- 1
mindspore/ccsrc/frontend/parallel/context.h View File

@@ -28,7 +28,7 @@
#include "utils/convert_utils.h"
#include "ir/anf.h"
#include "ir/func_graph.h"
#include "debug/info.h"
#include "utils/info.h"
#include "abstract/abstract_value.h"

namespace mindspore {


+ 1
- 1
mindspore/ccsrc/pipeline/jit/action.cc View File

@@ -23,7 +23,7 @@
#include <algorithm>
#include <functional>

#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "ir/param_value.h"
#include "frontend/parallel/costmodel_context.h"
#include "frontend/parallel/context.h"


+ 1
- 1
mindspore/ccsrc/pipeline/jit/parse/data_converter.cc View File

@@ -28,7 +28,7 @@
#include "pipeline/jit/parse/python_adapter.h"
#include "frontend/operator/ops.h"
#include "frontend/operator/composite/composite.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "utils/symbolic.h"
#include "utils/context/ms_context.h"
#include "debug/trace.h"


+ 1
- 1
mindspore/ccsrc/pipeline/jit/parse/function_block.cc View File

@@ -23,7 +23,7 @@
#include "pipeline/jit/parse/resolve.h"
#include "pipeline/jit/parse/parse.h"
#include "frontend/operator/ops.h"
#include "debug/info.h"
#include "utils/info.h"
#include "debug/trace.h"
#include "pybind11/pybind11.h"



+ 1
- 1
mindspore/ccsrc/pipeline/jit/pass.cc View File

@@ -24,7 +24,7 @@
#include <algorithm>
#include <functional>

#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "debug/anf_ir_utils.h"
#include "pipeline/jit/parse/parse_base.h"
#include "pipeline/jit/parse/data_converter.h"


+ 1
- 1
mindspore/ccsrc/pipeline/jit/static_analysis/evaluator.cc View File

@@ -19,7 +19,7 @@
#include <algorithm>
#include <unordered_set>

#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "abstract/utils.h"
#include "debug/trace.h"
#include "utils/context/ms_context.h"


+ 1
- 1
mindspore/ccsrc/pipeline/jit/static_analysis/program_specialize.h View File

@@ -28,7 +28,7 @@
#include <vector>

#include "ir/anf.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "pipeline/jit/static_analysis/evaluator.h"

namespace mindspore {


+ 1
- 1
mindspore/ccsrc/pipeline/jit/static_analysis/static_analysis.cc View File

@@ -26,7 +26,7 @@
#include "frontend/operator/ops.h"
#include "utils/symbolic.h"
#include "ir/tensor.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "./common.h"
#include "pipeline/jit/parse/data_converter.h"
#include "debug/draw.h"


+ 3
- 3
mindspore/ccsrc/utils/primitive_py.h View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/

#ifndef MINDSPORE_CORE_IR_PRIMITIVE_PY_H_
#define MINDSPORE_CORE_IR_PRIMITIVE_PY_H_
#ifndef MINDSPORE_CCSRC_UTILS_PRIMITIVE_PY_H_
#define MINDSPORE_CCSRC_UTILS_PRIMITIVE_PY_H_

#include <unordered_map>
#include <vector>
@@ -77,4 +77,4 @@ class PrimitivePy : public Primitive {

using PrimitivePyPtr = std::shared_ptr<PrimitivePy>;
} // namespace mindspore
#endif // MINDSPORE_CORE_IR_PRIMITIVE_PY_H_
#endif // MINDSPORE_CCSRC_UTILS_PRIMITIVE_PY_H_

+ 3
- 3
mindspore/ccsrc/utils/tensor_py.h View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/

#ifndef MINDSPORE_CORE_IR_TENSOR_PY_H_
#define MINDSPORE_CORE_IR_TENSOR_PY_H_
#ifndef MINDSPORE_CCSRC_UTILS_TENSOR_PY_H_
#define MINDSPORE_CCSRC_UTILS_TENSOR_PY_H_

#include <memory>
#include <string>
@@ -108,4 +108,4 @@ class TensorPy {
} // namespace tensor
} // namespace mindspore

#endif // MINDSPORE_CORE_IR_TENSOR_PY_H_
#endif // MINDSPORE_CCSRC_UTILS_TENSOR_PY_H_

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

@@ -30,7 +30,7 @@
#include "utils/log_adapter.h"
#include "utils/utils.h"
#include "ir/manager.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "frontend/operator/ops.h"

namespace mindspore {


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

@@ -29,7 +29,7 @@
#include "ir/tensor.h"
#include "frontend/operator/ops.h"
#include "ir/manager.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "utils/primitive_py.h"
#include "utils/convert_utils.h"
#include "utils/primitive_utils.h"


+ 1
- 1
mindspore/core/abstract/analysis_context.cc View File

@@ -19,7 +19,7 @@
#include <algorithm>

#include "utils/symbolic.h"
#include "debug/trace.h"
#include "utils/trace_base.h"

namespace mindspore {
namespace abstract {


+ 3
- 4
mindspore/core/base/base_ref_utils.h View File

@@ -13,7 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef MINDSPORE_CORE_BASE_BASE_REF_UTILS_H
#define MINDSPORE_CORE_BASE_BASE_REF_UTILS_H
#include <vector>
#include <memory>

@@ -21,9 +22,7 @@
#include "ir/tensor.h"
#include "base/base_ref.h"

#ifndef MINDSPORE_CCSRC_UTILS_BASE_REF_UTILS_H
#define MINDSPORE_CCSRC_UTILS_BASE_REF_UTILS_H
namespace mindspore {
std::vector<tensor::TensorPtr> TransformVectorRefToMultiTensor(const VectorRef &base_ref);
} // namespace mindspore
#endif // MINDSPORE_CCSRC_UTILS_BASE_REF_UTILS_H
#endif // MINDSPORE_CORE_BASE_BASE_REF_UTILS_H

+ 1
- 1
mindspore/core/ir/anf.h View File

@@ -30,7 +30,7 @@
#include "base/user_data.h"
#include "ir/kernel_info_dev.h"
#include "ir/scope.h"
#include "debug/info.h"
#include "utils/info.h"

// A MindSpore ANF IR defined here.
// with BNF followed:


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

@@ -24,7 +24,6 @@
#include "ir/visitor.h"
#include "ir/func_graph.h"
#include "base/core_ops.h"
#include "debug/label.h"

namespace mindspore {
// namespace to support intermediate representation definition


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

@@ -22,7 +22,7 @@
#include <sstream>
#include <utility>

#include "debug/trace_base.h"
#include "utils/trace_base.h"
#include "ir/manager.h"
#include "utils/flags.h"
#include "utils/ordered_set.h"


+ 1
- 2
mindspore/core/ir/func_graph.h View File

@@ -33,6 +33,7 @@
#include "utils/ordered_set.h"
#include "utils/ordered_map.h"
#include "base/base_ref.h"
#include "ir/func_graph_cloner.h"

namespace mindspore {
using BaseRefCounterMap = OrderedMap<BaseRef, int, BaseRefHash>;
@@ -420,8 +421,6 @@ size_t NewFgSeenGeneration();
std::shared_ptr<OrderedSet<CNodePtr>> FindRoots(const std::vector<CNodePtr> &segment);
// Find the leaf cnodes of a segment of cnodes.
std::shared_ptr<OrderedSet<CNodePtr>> FindLeaves(const std::vector<CNodePtr> &segment);

FuncGraphPtr BasicClone(const FuncGraphPtr &func_graph);
} // namespace mindspore

#endif // MINDSPORE_CORE_IR_FUNC_GRAPH_H_

mindspore/ccsrc/utils/func_graph_cloner.cc → mindspore/core/ir/func_graph_cloner.cc View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"

#include <algorithm>

@@ -23,7 +23,6 @@
#include "base/core_ops.h"
#include "utils/convert_utils_base.h"
#include "utils/log_adapter.h"
#include "utils/profile.h"
#include "utils/context/ms_context.h"
#include "ir/graph_utils.h"


mindspore/ccsrc/utils/func_graph_cloner.h → mindspore/core/ir/func_graph_cloner.h View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/

#ifndef MINDSPORE_CCSRC_UTILS_FUNC_GRAPH_CLONER_H_
#define MINDSPORE_CCSRC_UTILS_FUNC_GRAPH_CLONER_H_
#ifndef MINDSPORE_CORE_IR_FUNC_GRAPH_CLONER_H_
#define MINDSPORE_CORE_IR_FUNC_GRAPH_CLONER_H_

#include <functional>
#include <list>
@@ -128,6 +128,7 @@ ClonerPtr SpecializerClone(const FuncGraphPtr &func_graph, const TraceInfoPtr &r

FuncGraphPtr TransformableClone(const FuncGraphPtr &func_graph,
const TraceInfoPtr &relation = std::make_shared<TraceTransform>());
FuncGraphPtr BasicClone(const FuncGraphPtr &func_graph);
} // namespace mindspore

#endif // MINDSPORE_CCSRC_UTILS_FUNC_GRAPH_CLONER_H_
#endif // MINDSPORE_CORE_IR_FUNC_GRAPH_CLONER_H_

+ 1
- 2
mindspore/core/ir/func_graph_extends.cc View File

@@ -23,9 +23,8 @@
#include "base/core_ops.h"
#include "utils/ordered_set.h"
#include "abstract/abstract_value.h"
#include "debug/trace.h"
#include "abstract/abstract_function.h"
#include "debug/draw.h"
#include "debug/label.h"

namespace mindspore {
using mindspore::abstract::AbstractFunction;


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

@@ -28,7 +28,6 @@
#include <deque>
#include <set>

#include "debug/label.h"
#include "ir/func_graph.h"
#include "utils/log_adapter.h"
#include "utils/context/ms_context.h"


+ 4
- 4
mindspore/core/ir/graph_utils.h View File

@@ -16,8 +16,8 @@
* limitations under the License.
*/

#ifndef MINDSPORE_CCSRC_UTILS_GRAPH_UTILS_H_
#define MINDSPORE_CCSRC_UTILS_GRAPH_UTILS_H_
#ifndef MINDSPORE_CORE_IR_GRAPH_UTILS_H_
#define MINDSPORE_CORE_IR_GRAPH_UTILS_H_

#include <unordered_map>
#include <unordered_set>
@@ -32,7 +32,7 @@
#include "ir/primitive.h"
#include "ir/scalar.h"
#include "ir/tensor.h"
#include "debug/label.h"
#include "utils/label.h"

namespace mindspore {

@@ -94,4 +94,4 @@ class FuncGraphIndex {
};
} // namespace mindspore

#endif // MINDSPORE_CCSRC_UTILS_GRAPH_UTILS_H_
#endif // MINDSPORE_CORE_IR_GRAPH_UTILS_H_

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

@@ -28,7 +28,7 @@
#include "ir/visitor.h"
#include "ir/manager.h"
#include "ir/func_graph.h"
#include "debug/label.h"
#include "utils/label.h"
#include "utils/log_adapter.h"
#include "common/utils.h"



+ 3
- 3
mindspore/core/utils/any.h View File

@@ -13,8 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef MINDSPORE_CCSRC_UTILS_ANY_H_
#define MINDSPORE_CCSRC_UTILS_ANY_H_
#ifndef MINDSPORE_CORE_UTILS_ANY_H_
#define MINDSPORE_CORE_UTILS_ANY_H_

#include <iostream>
#include <string>
@@ -211,4 +211,4 @@ bool AnyIsLiteral(const Any &any);

} // namespace mindspore

#endif // MINDSPORE_CCSRC_UTILS_ANY_H_
#endif // MINDSPORE_CORE_UTILS_ANY_H_

+ 3
- 3
mindspore/core/utils/convert_utils_base.h View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/

#ifndef MINDSPORE_CCSRC_UTILS_CONVERT_UTILS_BASE_H_
#define MINDSPORE_CCSRC_UTILS_CONVERT_UTILS_BASE_H_
#ifndef MINDSPORE_CORE_UTILS_CONVERT_UTILS_BASE_H_
#define MINDSPORE_CORE_UTILS_CONVERT_UTILS_BASE_H_

#include <limits>
#include <memory>
@@ -129,4 +129,4 @@ inline uint8_t *AddressOffset(void *address, size_t offset) {
}
} // namespace mindspore

#endif // MINDSPORE_CCSRC_UTILS_CONVERT_UTILS_BASE_H_
#endif // MINDSPORE_CORE_UTILS_CONVERT_UTILS_BASE_H_

+ 3
- 3
mindspore/core/utils/hashing.h View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/

#ifndef MINDSPORE_CCSRC_UTILS_HASHING_H_
#define MINDSPORE_CCSRC_UTILS_HASHING_H_
#ifndef MINDSPORE_CORE_UTILS_HASHING_H_
#define MINDSPORE_CORE_UTILS_HASHING_H_

#include <initializer_list>

@@ -33,4 +33,4 @@ inline std::size_t hash_combine(const std::initializer_list<std::size_t> &hash_v
return hash_sum;
}
} // namespace mindspore
#endif // MINDSPORE_CCSRC_UTILS_HASHING_H_
#endif // MINDSPORE_CORE_UTILS_HASHING_H_

mindspore/ccsrc/debug/info.cc → mindspore/core/utils/info.cc View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "debug/info.h"
#include "utils/info.h"
#include <utility>
#include <fstream>
#include <sstream>

mindspore/ccsrc/debug/info.h → mindspore/core/utils/info.h View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/

#ifndef MINDSPORE_CCSRC_IR_INFO_H_
#define MINDSPORE_CCSRC_IR_INFO_H_
#ifndef MINDSPORE_CORE_UTILS_INFO_H_
#define MINDSPORE_CORE_UTILS_INFO_H_

#include <iostream>
#include <string>
@@ -25,7 +25,7 @@
#include <vector>

#include "base/base.h"
#include "debug/trace_info.h"
#include "utils/trace_info.h"

namespace mindspore {
// namespace to support intermediate representation definition
@@ -232,4 +232,4 @@ class GraphDebugInfo : public DebugInfo {
using GraphDebugInfoPtr = std::shared_ptr<GraphDebugInfo>;
} // namespace mindspore

#endif // MINDSPORE_CCSRC_IR_INFO_H_
#endif // MINDSPORE_CORE_UTILS_INFO_H_

mindspore/ccsrc/debug/label.cc → mindspore/core/utils/label.cc View File

@@ -14,12 +14,12 @@
* limitations under the License.
*/

#include "debug/label.h"
#include "utils/label.h"
#include <algorithm>
#include <sstream>
#include <utility>

#include "debug/info.h"
#include "utils/info.h"
#include "ir/func_graph.h"

namespace mindspore {

mindspore/ccsrc/debug/label.h → mindspore/core/utils/label.h View File


+ 3
- 3
mindspore/core/utils/log_adapter.h View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/

#ifndef MINDSPORE_CCSRC_UTILS_LOG_ADAPTER_H_
#define MINDSPORE_CCSRC_UTILS_LOG_ADAPTER_H_
#ifndef MINDSPORE_CORE_UTILS_LOG_ADAPTER_H_
#define MINDSPORE_CORE_UTILS_LOG_ADAPTER_H_

#include <stdarg.h>
#include <stdint.h>
@@ -201,4 +201,4 @@ class LogWriter {
#define MS_ASSERT(f) ((void)0)
#endif

#endif // MINDSPORE_CCSRC_UTILS_LOG_ADAPTER_H_
#endif // MINDSPORE_CORE_UTILS_LOG_ADAPTER_H_

+ 3
- 3
mindspore/core/utils/misc.h View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/

#ifndef MINDSPORE_CCSRC_UTILS_MISC_H_
#define MINDSPORE_CCSRC_UTILS_MISC_H_
#ifndef MINDSPORE_CORE_UTILS_MISC_H_
#define MINDSPORE_CORE_UTILS_MISC_H_

#include <cxxabi.h>
#include <list>
@@ -35,4 +35,4 @@ extern const int RET_BREAK;
extern std::string demangle(const char *name);

} // namespace mindspore
#endif // MINDSPORE_CCSRC_UTILS_MISC_H_
#endif // MINDSPORE_CORE_UTILS_MISC_H_

+ 3
- 3
mindspore/core/utils/ordered_map.h View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/

#ifndef MINDSPORE_CCSRC_UTILS_ORDERED_MAP_H_
#define MINDSPORE_CCSRC_UTILS_ORDERED_MAP_H_
#ifndef MINDSPORE_CORE_UTILS_ORDERED_MAP_H_
#define MINDSPORE_CORE_UTILS_ORDERED_MAP_H_

#include <algorithm>
#include <unordered_map>
@@ -198,4 +198,4 @@ class OrderedMap {
};
} // namespace mindspore

#endif // MINDSPORE_CCSRC_UTILS_ORDERED_MAP_H_
#endif // MINDSPORE_CORE_UTILS_ORDERED_MAP_H_

+ 3
- 3
mindspore/core/utils/ordered_set.h View File

@@ -16,8 +16,8 @@
* limitations under the License.
*/

#ifndef MINDSPORE_CCSRC_UTILS_ORDERED_SET_H_
#define MINDSPORE_CCSRC_UTILS_ORDERED_SET_H_
#ifndef MINDSPORE_CORE_UTILS_ORDERED_SET_H_
#define MINDSPORE_CORE_UTILS_ORDERED_SET_H_

#include <algorithm>
#include <unordered_map>
@@ -280,4 +280,4 @@ class OrderedSet {

} // namespace mindspore

#endif // MINDSPORE_CCSRC_UTILS_ORDERED_SET_H_
#endif // MINDSPORE_CORE_UTILS_ORDERED_SET_H_

+ 3
- 3
mindspore/core/utils/overload.h View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/

#ifndef MINDSPORE_CCSRC_UTILS_OVERLOAD_H_
#define MINDSPORE_CCSRC_UTILS_OVERLOAD_H_
#ifndef MINDSPORE_CORE_UTILS_OVERLOAD_H_
#define MINDSPORE_CORE_UTILS_OVERLOAD_H_

#include <list>
#include <utility>
@@ -135,4 +135,4 @@ std::string ToString(const std::map<T1, T2> &map) {
}
} // namespace mindspore

#endif // MINDSPORE_CCSRC_UTILS_OVERLOAD_H_
#endif // MINDSPORE_CORE_UTILS_OVERLOAD_H_

+ 3
- 3
mindspore/core/utils/signal.h View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/

#ifndef MINDSPORE_CCSRC_UTILS_SIGNAL_H_
#define MINDSPORE_CCSRC_UTILS_SIGNAL_H_
#ifndef MINDSPORE_CORE_UTILS_SIGNAL_H_
#define MINDSPORE_CORE_UTILS_SIGNAL_H_

#include <functional>
#include <memory>
@@ -66,4 +66,4 @@ class Signal {
};
} // namespace mindspore

#endif // MINDSPORE_CCSRC_UTILS_EVENT_H_
#endif // MINDSPORE_CORE_UTILS_EVENT_H_

+ 3
- 3
mindspore/core/utils/symbolic.h View File

@@ -16,8 +16,8 @@
* limitations under the License.
*/

#ifndef MINDSPORE_CCSRC_UTILS_SYMBOLIC_H_
#define MINDSPORE_CCSRC_UTILS_SYMBOLIC_H_
#ifndef MINDSPORE_CORE_UTILS_SYMBOLIC_H_
#define MINDSPORE_CORE_UTILS_SYMBOLIC_H_

#include <unordered_map>
#include <memory>
@@ -171,4 +171,4 @@ extern std::shared_ptr<EnvInstance> newenv;

} // namespace mindspore

#endif // MINDSPORE_CCSRC_UTILS_SYMBOLIC_H_
#endif // MINDSPORE_CORE_UTILS_SYMBOLIC_H_

mindspore/ccsrc/debug/trace_base.cc → mindspore/core/utils/trace_base.cc View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "debug/trace_base.h"
#include "utils/trace_base.h"

#include <iostream>
#include <fstream>

mindspore/ccsrc/debug/trace_base.h → mindspore/core/utils/trace_base.h View File

@@ -13,8 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef MINDSPORE_CCSRC_DEBUG_TRACE_BASE_H_
#define MINDSPORE_CCSRC_DEBUG_TRACE_BASE_H_
#ifndef MINDSPORE_CORE_UTILS_TRACE_BASE_H_
#define MINDSPORE_CORE_UTILS_TRACE_BASE_H_

#include <fstream>
#include <memory>
@@ -23,7 +23,7 @@
#include <utility>
#include <stack>

#include "debug/info.h"
#include "utils/info.h"
#include "ir/anf.h"
#include "ir/func_graph.h"
#include "utils/any.h"
@@ -36,4 +36,4 @@ std::string GetDebugInfo(const DebugInfoPtr &info, const std::string &prefix,
} // namespace trace
} // namespace mindspore

#endif // MINDSPORE_CCSRC_DEBUG_TRACE_BASE_H_
#endif // MINDSPORE_CORE_UTILS_TRACE_BASE_H_

mindspore/ccsrc/debug/trace_info.cc → mindspore/core/utils/trace_info.cc View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "debug/trace_info.h"
#include "utils/trace_info.h"
#include <utility>
#include <fstream>
#include <sstream>

mindspore/ccsrc/debug/trace_info.h → mindspore/core/utils/trace_info.h View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/

#ifndef MINDSPORE_CCSRC_DEBUG_TRACE_INFO_H_
#define MINDSPORE_CCSRC_DEBUG_TRACE_INFO_H_
#ifndef MINDSPORE_CORE_UTILS_TRACE_INFO_H_
#define MINDSPORE_CORE_UTILS_TRACE_INFO_H_

#include <iostream>
#include <string>
@@ -414,4 +414,4 @@ class TraceCombileLikeGraphs : public TraceInfo {
};
} // namespace mindspore

#endif // MINDSPORE_CCSRC_DEBUG_TRACE_INFO_H_
#endif // MINDSPORE_CORE_UTILS_TRACE_INFO_H_

+ 3
- 3
mindspore/core/utils/visible.h View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/

#ifndef MINDSPORE_CCSRC_UTILS_VISIBLE_H_
#define MINDSPORE_CCSRC_UTILS_VISIBLE_H_
#ifndef MINDSPORE_CORE_UTILS_VISIBLE_H_
#define MINDSPORE_CORE_UTILS_VISIBLE_H_

namespace mindspore {
// refer to https://gcc.gnu.org/wiki/Visibility
@@ -41,4 +41,4 @@ namespace mindspore {

} // namespace mindspore

#endif // MINDSPORE_CCSRC_UTILS_VISIBLE_H_
#endif // MINDSPORE_CORE_UTILS_VISIBLE_H_

+ 1
- 1
tests/ut/cpp/ir/clone_test.cc View File

@@ -20,7 +20,7 @@

#include "ir/manager.h"
#include "utils/log_adapter.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "pipeline/jit/parse/parse.h"
#include "ir/graph_utils.h"
#include "debug/draw.h"


+ 2
- 2
tests/ut/cpp/ir/manager_test.cc View File

@@ -17,12 +17,12 @@
#include "common/py_func_graph_fetcher.h"
#include "ir/dtype.h"
#include "ir/manager.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "pipeline/jit/parse/parse.h"
#include "frontend/operator/ops.h"
#include "utils/log_adapter.h"
#include "debug/draw.h"
#include "debug/label.h"
#include "utils/label.h"
#include "./common.h"

namespace mindspore {


+ 1
- 1
tests/ut/cpp/optimizer/ad/ad_test.cc View File

@@ -21,7 +21,7 @@
#include "common/py_func_graph_fetcher.h"
#include "ir/manager.h"
#include "ir/value.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "utils/log_adapter.h"
#include "ir/graph_utils.h"
#include "pipeline/jit/resource.h"


+ 1
- 1
tests/ut/cpp/optimizer/cconv_test.cc View File

@@ -18,7 +18,7 @@
#include "common/common_test.h"
#include "common/py_func_graph_fetcher.h"

#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "utils/log_adapter.h"
#include "pipeline/jit/parse/parse.h"
#include "debug/draw.h"


+ 1
- 1
tests/ut/cpp/optimizer/lib_test.cc View File

@@ -21,7 +21,7 @@
#include "common/py_func_graph_fetcher.h"
#include "ir/anf.h"
#include "ir/func_graph.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "ir/manager.h"
#include "ir/value.h"
#include "frontend/operator/ops.h"


+ 1
- 1
tests/ut/cpp/optimizer/opt_test.cc View File

@@ -21,7 +21,7 @@

#include "ir/anf.h"
#include "ir/visitor.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "frontend/optimizer/opt.h"
#include "frontend/optimizer/anf_visitor.h"
#include "frontend/optimizer/irpass.h"


+ 1
- 1
tests/ut/cpp/vm/segment_runner_test.cc View File

@@ -19,7 +19,7 @@
#include "common/py_func_graph_fetcher.h"
#include "ir/manager.h"
#include "utils/log_adapter.h"
#include "utils/func_graph_cloner.h"
#include "ir/func_graph_cloner.h"
#include "pipeline/jit/parse/parse.h"
#include "ir/graph_utils.h"
#include "pipeline/jit/resource.h"


Loading…
Cancel
Save