forked from OSSInnovation/mindspore
decoupling core and context
This commit is contained in:
parent
3e7ba14e19
commit
d81862a916
|
@ -30,7 +30,7 @@
|
|||
#include "proto/attr.pb.h"
|
||||
#include "proto/node_def.pb.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "backend/kernel_compiler/aicpu/aicpu_util.h"
|
||||
#include "backend/session/kernel_graph.h"
|
||||
#include "backend/kernel_compiler/common_utils.h"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "backend/kernel_compiler/aicpu/aicpu_kernel_build.h"
|
||||
#include "utils/convert_utils.h"
|
||||
#include "backend/kernel_compiler/aicpu/aicpu_util.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
|
||||
using AicpuTaskInfoPtr = std::shared_ptr<ge::model_runner::AicpuTaskInfo>;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <iterator>
|
||||
#include <numeric>
|
||||
#include <unordered_set>
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "utils/convert_utils.h"
|
||||
#include "utils/any.h"
|
||||
#include "utils/utils.h"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "runtime/rt.h"
|
||||
#include "utils/log_adapter.h"
|
||||
#include "utils/convert_utils.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace kernel {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "backend/kernel_compiler/kernel.h"
|
||||
#include "backend/kernel_compiler/akg/akg_kernel_build.h"
|
||||
#include "backend/kernel_compiler/akg/gpu/akg_gpu_kernel_mod.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace kernel {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include <fstream>
|
||||
#include <algorithm>
|
||||
#include "nlohmann/json.hpp"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace kernel {
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <thread>
|
||||
#include "nlohmann/json.hpp"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "ir/manager.h"
|
||||
#include "ir/meta_tensor.h"
|
||||
#include "ir/func_graph.h"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "backend/kernel_compiler/cpu/apply_momentum_cpu_kernel.h"
|
||||
#include "backend/kernel_compiler/cpu/mkldnn/mkl_kernel_engine.h"
|
||||
#include "runtime/device/cpu/cpu_device_address.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace kernel {
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "backend/kernel_compiler/cpu/cpu_kernel.h"
|
||||
#include "runtime/device/cpu/kernel_select_cpu.h"
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
#include "backend/kernel_compiler/cpu/debug_cpu_kernel.h"
|
||||
#include "runtime/device/cpu/cpu_device_address.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
#include "debug/debugger/debugger.h"
|
||||
#endif
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
#include "backend/kernel_compiler/cpu/mkldnn/conv2d_cpu_kernel.h"
|
||||
#include <string>
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "backend/kernel_compiler/cpu/mkldnn/mkl_kernel_engine.h"
|
||||
#include "runtime/device/cpu/cpu_device_address.h"
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
#include "backend/kernel_compiler/cpu/mkldnn/conv2d_grad_filter_cpu_kernel.h"
|
||||
#include <string>
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "backend/kernel_compiler/cpu/mkldnn/mkl_kernel_engine.h"
|
||||
#include "runtime/device/cpu/cpu_device_address.h"
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include <string>
|
||||
#include "backend/kernel_compiler/cpu/mkldnn/mkl_kernel_engine.h"
|
||||
#include "runtime/device/cpu/cpu_device_address.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace kernel {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
#include "backend/kernel_compiler/cpu/mkldnn/lstm_cpu_kernel.h"
|
||||
#include <string>
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "backend/kernel_compiler/cpu/mkldnn/mkl_kernel_engine.h"
|
||||
#include "runtime/device/cpu/cpu_device_address.h"
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include <cmath>
|
||||
#include <numeric>
|
||||
#include <string>
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "backend/kernel_compiler/cpu/mkldnn/mkl_kernel_engine.h"
|
||||
#include "runtime/device/cpu/cpu_device_address.h"
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include <algorithm>
|
||||
#include <utility>
|
||||
#include "backend/kernel_compiler/cpu/mkldnn/mkl_kernel_engine.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "runtime/device/cpu/cpu_device_address.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include <vector>
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "backend/kernel_compiler/cpu/mkldnn/mkl_kernel_engine.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <vector>
|
||||
#include <memory>
|
||||
#include "dnnl.hpp"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace kernel {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "backend/kernel_compiler/cpu/mkldnn/mul_cpu_kernel.h"
|
||||
#include "backend/kernel_compiler/cpu/mkldnn/mkl_kernel_engine.h"
|
||||
#include "runtime/device/cpu/cpu_device_address.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace kernel {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "backend/kernel_compiler/cpu/mkldnn/pooling_cpu_kernel.h"
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "backend/kernel_compiler/cpu/mkldnn/mkl_kernel_engine.h"
|
||||
#include "runtime/device/cpu/cpu_device_address.h"
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include <string>
|
||||
#include <utility>
|
||||
#include <algorithm>
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "backend/kernel_compiler/cpu/mkldnn/mkl_kernel_engine.h"
|
||||
#include "runtime/device/cpu/cpu_device_address.h"
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "backend/kernel_compiler/cpu/mkldnn/relu_cpu_kernel.h"
|
||||
#include "backend/kernel_compiler/cpu/mkldnn/mkl_kernel_engine.h"
|
||||
#include "runtime/device/cpu/cpu_device_address.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace kernel {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "backend/kernel_compiler/cpu/mkldnn/relu_grad_cpu_kernel.h"
|
||||
#include "backend/kernel_compiler/cpu/mkldnn/mkl_kernel_engine.h"
|
||||
#include "runtime/device/cpu/cpu_device_address.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace kernel {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "backend/kernel_compiler/cpu/mkldnn/softmax_cpu_kernel.h"
|
||||
#include "backend/kernel_compiler/cpu/mkldnn/mkl_kernel_engine.h"
|
||||
#include "runtime/device/cpu/cpu_device_address.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace kernel {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <cmath>
|
||||
#include "backend/kernel_compiler/cpu/mkldnn/mkl_kernel_engine.h"
|
||||
#include "runtime/device/cpu/cpu_device_address.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace kernel {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <cmath>
|
||||
#include "backend/kernel_compiler/cpu/mkldnn/mkl_kernel_engine.h"
|
||||
#include "runtime/device/cpu/cpu_device_address.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace kernel {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "runtime/device/kernel_info.h"
|
||||
#include "runtime/device/gpu/cuda_common.h"
|
||||
#include "backend/kernel_compiler/common_utils.h"
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "runtime/device/ascend/tasksink/runtime_utils.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "utils/utils.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
|
||||
using HcclTaskInfoPtr = std::shared_ptr<ge::model_runner::HcclTaskInfo>;
|
||||
using ge::model_runner::HcclTaskInfo;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "backend/kernel_compiler/ascend_kernel_mod.h"
|
||||
#include "backend/kernel_compiler/hccl/hcom_util.h"
|
||||
#include "hccl/hcom.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace kernel {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace kernel {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace kernel {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace kernel {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace kernel {
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "backend/kernel_compiler/tbe/tbe_kernel_build.h"
|
||||
#include "backend/kernel_compiler/tbe/tbe_kernel_parallel_build.h"
|
||||
#include "backend/kernel_compiler/tbe/tbe_utils.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "backend/kernel_compiler/tbe/tbe_kernel_select/tbe_kernel_select.h"
|
||||
#include "backend/kernel_compiler/akg/akg_kernel_metadata.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace kernel {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <fstream>
|
||||
#include "utils/log_adapter.h"
|
||||
#include "utils/overload.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace kernel {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <string>
|
||||
#include <memory>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "backend/kernel_compiler/oplib/opinfo.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <memory>
|
||||
|
||||
#include "runtime/mem.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
|
||||
using ge::model_runner::MemcpyAsyncTaskInfo;
|
||||
using MemcpyAsyncTaskInfoPtr = std::shared_ptr<MemcpyAsyncTaskInfo>;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "runtime/stream.h"
|
||||
#include "framework/ge_runtime/task_info.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
|
||||
using ge::model_runner::LabelGotoTaskInfo;
|
||||
using LabelGotoTaskInfoPtr = std::shared_ptr<LabelGotoTaskInfo>;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "runtime/stream.h"
|
||||
#include "framework/ge_runtime/task_info.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
|
||||
using ge::model_runner::LabelSetTaskInfo;
|
||||
using LabelSetTaskInfoPtr = std::shared_ptr<LabelSetTaskInfo>;
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "runtime/stream.h"
|
||||
#include "framework/ge_runtime/task_info.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
|
||||
using ge::model_runner::LabelSwitchTaskInfo;
|
||||
using LabelSwitchTaskInfoPtr = std::shared_ptr<LabelSwitchTaskInfo>;
|
||||
|
|
|
@ -20,10 +20,10 @@
|
|||
#include <string>
|
||||
|
||||
#include "runtime/mem.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "common/trans.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
|
||||
using ge::model_runner::MemcpyAsyncTaskInfo;
|
||||
using MemcpyAsyncTaskInfoPtr = std::shared_ptr<MemcpyAsyncTaskInfo>;
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
#include "backend/kernel_compiler/rts/recv.h"
|
||||
#include <memory>
|
||||
#include "runtime/stream.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "runtime/device/ascend/ascend_stream_assign.h"
|
||||
#include "framework/ge_runtime/task_info.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace kernel {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <algorithm>
|
||||
#include "utils/convert_utils.h"
|
||||
#include "utils/utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "runtime/event.h"
|
||||
#include "framework/ge_runtime/task_info.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
|
||||
using ge::model_runner::EventRecordTaskInfo;
|
||||
using EventRecordTaskInfoPtr = std::shared_ptr<EventRecordTaskInfo>;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "runtime/stream.h"
|
||||
#include "framework/ge_runtime/task_info.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
|
||||
using ge::model_runner::StreamActiveTaskInfo;
|
||||
using StreamActiveTaskInfoPtr = std::shared_ptr<StreamActiveTaskInfo>;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "runtime/stream.h"
|
||||
#include "framework/ge_runtime/task_info.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
|
||||
using ge::model_runner::StreamSwitchTaskInfo;
|
||||
using StreamSwitchTaskInfoPtr = std::shared_ptr<StreamSwitchTaskInfo>;
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <string>
|
||||
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace kernel {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "backend/kernel_compiler/tbe/tbe_kernel_mod.h"
|
||||
#include <algorithm>
|
||||
#include "runtime/rt.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "graphengine/inc/framework/ge_runtime/task_info.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "backend/kernel_compiler/tbe/tbe_adapter.h"
|
||||
#include "backend/kernel_compiler/tbe/tbe_kernel_build.h"
|
||||
#include "backend/kernel_compiler/tbe/tbe_kernel_mod.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "backend/kernel_compiler/oplib/oplib.h"
|
||||
#include "backend/kernel_compiler/tbe/tbe_kernel_build.h"
|
||||
#include "nlohmann/json.hpp"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "backend/optimizer/common/helper.h"
|
||||
#include "backend/kernel_compiler/tbe/tbe_convert_utils.h"
|
||||
#include "frontend/parallel/ops_info/ops_utils.h"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "backend/kernel_compiler/oplib/oplib.h"
|
||||
#include "utils/utils.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "runtime/device/kernel_info.h"
|
||||
#include "ir/dtype/type.h"
|
||||
#include "backend/kernel_compiler/tbe/tbe_convert_utils.h"
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
#include "backend/optimizer/ascend/ir_fission/concat_fission.h"
|
||||
#include "backend/optimizer/ascend/ir_fission/pack_fission.h"
|
||||
#include "backend/optimizer/ascend/enhancer/concat_outputs_for_all_gather.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "utils/config_manager.h"
|
||||
#include "debug/anf_ir_dump.h"
|
||||
#include "debug/anf_ir_utils.h"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "backend/optimizer/ascend/ascend_helper.h"
|
||||
#include <set>
|
||||
#include "common/trans.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "backend/optimizer/common/helper.h"
|
||||
#include "utils/utils.h"
|
||||
#include "runtime/device/kernel_info.h"
|
||||
|
@ -26,7 +26,7 @@
|
|||
#include "frontend/operator/ops.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "backend/session/kernel_graph.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace opt {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "debug/anf_ir_dump.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "frontend/operator/ops.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "backend/optimizer/common/fusion_id_allocator.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "debug/anf_ir_dump.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "frontend/operator/ops.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "backend/optimizer/common/fusion_id_allocator.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "debug/anf_ir_dump.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "frontend/operator/ops.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "backend/optimizer/common/fusion_id_allocator.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "debug/anf_ir_dump.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "frontend/operator/ops.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "backend/optimizer/common/fusion_id_allocator.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "debug/anf_ir_dump.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "frontend/operator/ops.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "backend/optimizer/common/fusion_id_allocator.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "debug/anf_ir_dump.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "frontend/operator/ops.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "backend/optimizer/common/fusion_id_allocator.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "debug/anf_ir_dump.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "frontend/operator/ops.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "backend/optimizer/common/fusion_id_allocator.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "debug/anf_ir_dump.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "frontend/operator/ops.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "backend/optimizer/common/fusion_id_allocator.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "debug/anf_ir_dump.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "frontend/operator/ops.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "backend/optimizer/common/fusion_id_allocator.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include <unordered_set>
|
||||
#include <memory>
|
||||
#include "debug/anf_ir_dump.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "backend/optimizer/common/fusion_id_allocator.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "debug/anf_ir_dump.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "frontend/operator/ops.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "backend/optimizer/common/fusion_id_allocator.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "debug/anf_ir_dump.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "frontend/operator/ops.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "backend/optimizer/common/fusion_id_allocator.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "debug/anf_ir_dump.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "frontend/operator/ops.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "backend/optimizer/common/fusion_id_allocator.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "debug/anf_ir_dump.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "frontend/operator/ops.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "backend/optimizer/common/fusion_id_allocator.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "debug/anf_ir_dump.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "frontend/operator/ops.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "backend/optimizer/common/fusion_id_allocator.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "frontend/operator/ops.h"
|
||||
#include "runtime/device/kernel_info.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace opt {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "utils/utils.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "backend/kernel_compiler/common_utils.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "utils/utils.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "backend/kernel_compiler/common_utils.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "runtime/device/kernel_info.h"
|
||||
#include "backend/kernel_compiler/oplib/oplib.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace opt {
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "backend/kernel_compiler/kernel_build_info.h"
|
||||
#include "utils/utils.h"
|
||||
#include "backend/kernel_compiler/common_utils.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "backend/optimizer/common/helper.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
#include <memory>
|
||||
|
||||
#include "utils/utils.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "backend/optimizer/common/helper.h"
|
||||
#include "runtime/device/kernel_info.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
#include <memory>
|
||||
|
||||
#include "utils/utils.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "backend/optimizer/common/helper.h"
|
||||
#include "runtime/device/kernel_info.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <memory>
|
||||
|
||||
#include "utils/utils.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "backend/optimizer/common/helper.h"
|
||||
#include "runtime/device/kernel_info.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "runtime/device/kernel_info.h"
|
||||
#include "ir/primitive.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "utils/utils.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "backend/session/kernel_graph.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "runtime/device/kernel_info.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace opt {
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "ir/primitive.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "utils/utils.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <vector>
|
||||
#include <utility>
|
||||
#include "ir/anf.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace opt {
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "ir/primitive.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "utils/utils.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "backend/optimizer/pass/convert_tuple_input_to_dynamic_input.h"
|
||||
#include "backend/optimizer/pass/const_to_attr_strided_slice_grad.h"
|
||||
#include "backend/optimizer/pass/convert_const_scalar_to_tensor.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "debug/anf_ir_dump.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -26,9 +26,9 @@
|
|||
#include "base/base_ref.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "frontend/operator/ops.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "runtime/device/kernel_info.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace opt {
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <unordered_set>
|
||||
#include "ir/func_graph.h"
|
||||
#include "backend/session/kernel_graph.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "backend/optimizer/common/pattern_engine.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "backend/optimizer/common/pass_manager.h"
|
||||
#include "backend/optimizer/common/pattern_engine.h"
|
||||
#include "ir/graph_utils.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "backend/optimizer/common/helper.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "ir/func_graph.h"
|
||||
#include "ir/manager.h"
|
||||
#include "utils/utils.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "debug/anf_ir_dump.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "backend/optimizer/mem_reuse/mem_dynamic_allocator.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "utils/convert_utils.h"
|
||||
#include "utils/log_adapter.h"
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace opt {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include <vector>
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "ir/primitive.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "utils/utils.h"
|
||||
#include "abstract/abstract_value.h"
|
||||
#include "backend/optimizer/common/helper.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "backend/optimizer/pass/const_input_to_attr_registry.h"
|
||||
#include "backend/optimizer/common/helper.h"
|
||||
#include "utils/utils.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "frontend/operator/ops.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "backend/kernel_compiler/common_utils.h"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "backend/optimizer/common/helper.h"
|
||||
#include "backend/kernel_compiler/kernel.h"
|
||||
#include "backend/kernel_compiler/kernel_build_info.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "common/trans.h"
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "utils/union_find_set.h"
|
||||
#include "runtime/device/ascend/ascend_label_assign.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "debug/anf_ir_dump.h"
|
||||
|
||||
static constexpr size_t kCNodePrim = 0;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "ir/param_value.h"
|
||||
#include "runtime/device/kernel_runtime.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "common/trans.h"
|
||||
#include "utils/config_manager.h"
|
||||
#include "utils/base_ref_extends.h"
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include "debug/anf_ir_dump.h"
|
||||
#include "debug/anf_ir_utils.h"
|
||||
#include "debug/draw.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "backend/optimizer/common/helper.h"
|
||||
#include "runtime/device/kernel_runtime_manager.h"
|
||||
#include "utils/config_manager.h"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "ir/tensor.h"
|
||||
#include "ir/anf.h"
|
||||
#include "backend/kernel_compiler/kernel.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "backend/session/anf_runtime_algorithm.h"
|
||||
#include "runtime/device/kernel_runtime.h"
|
||||
#include "backend/kernel_compiler/cpu/cpu_kernel_factory.h"
|
||||
|
|
|
@ -31,9 +31,9 @@
|
|||
#include "backend/optimizer/gpu/replace_momentum_cast_fusion.h"
|
||||
#include "backend/optimizer/gpu/replace_addn_fusion.h"
|
||||
#include "runtime/device/kernel_runtime_manager.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "common/trans.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#include "utils/base_ref_extends.h"
|
||||
#include "debug/tensor_load.h"
|
||||
|
||||
|
|
|
@ -23,9 +23,10 @@
|
|||
#include "backend/session/session_factory.h"
|
||||
#include "base/base_ref_utils.h"
|
||||
#include "backend/kernel_compiler/oplib/oplib.h"
|
||||
#include "utils/context/context_extends.h"
|
||||
|
||||
#ifdef ENABLE_D
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#endif
|
||||
|
||||
using std::string;
|
||||
|
@ -223,7 +224,7 @@ Status MSInferSession::FinalizeEnv() {
|
|||
MS_LOG(ERROR) << "Get Context failed!";
|
||||
return FAILED;
|
||||
}
|
||||
if (!ms_context->CloseTsd()) {
|
||||
if (!context::CloseTsd(ms_context)) {
|
||||
MS_LOG(ERROR) << "Inference CloseTsd failed!";
|
||||
return FAILED;
|
||||
}
|
||||
|
@ -330,6 +331,10 @@ string MSInferSession::AjustTargetName(const std::string &device) {
|
|||
Status MSInferSession::InitEnv(const std::string &device, uint32_t device_id) {
|
||||
RegAllOp();
|
||||
auto ms_context = MsContext::GetInstance();
|
||||
if (ms_context == nullptr) {
|
||||
MS_LOG(ERROR) << "Get Context failed!";
|
||||
return FAILED;
|
||||
}
|
||||
ms_context->set_execution_mode(kGraphMode);
|
||||
ms_context->set_device_id(device_id);
|
||||
auto ajust_device = AjustTargetName(device);
|
||||
|
@ -343,11 +348,7 @@ Status MSInferSession::InitEnv(const std::string &device, uint32_t device_id) {
|
|||
return FAILED;
|
||||
}
|
||||
session_impl_->Init(device_id);
|
||||
if (ms_context == nullptr) {
|
||||
MS_LOG(ERROR) << "Get Context failed!";
|
||||
return FAILED;
|
||||
}
|
||||
if (!ms_context->OpenTsd()) {
|
||||
if (!context::OpenTsd(ms_context)) {
|
||||
MS_LOG(ERROR) << "Session init OpenTsd failed!";
|
||||
return FAILED;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "backend/optimizer/common/common_backend_optimization.h"
|
||||
#include "backend/optimizer/pass/const_input_to_attr_registry.h"
|
||||
#include "backend/optimizer/common/helper.h"
|
||||
#include "common/utils.h"
|
||||
#include "utils/ms_utils.h"
|
||||
#include "ir/dtype.h"
|
||||
#include "ir/anf.h"
|
||||
#include "ir/func_graph_cloner.h"
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "utils/contract.h"
|
||||
#include "pipeline/pynative/pynative_execute.h"
|
||||
#include "runtime/device/kernel_info.h"
|
||||
#include "utils/context/ms_context.h"
|
||||
#include "utils/ms_context.h"
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
#include "debug/debugger/debugger.h"
|
||||
#endif
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue