Browse Source

!7669 add rpath for opp default directories

Merge pull request !7669 from yanghaoran/master
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
eaa3fe98ed
4 changed files with 10 additions and 5 deletions
  1. +2
    -0
      mindspore/ccsrc/CMakeLists.txt
  2. +6
    -0
      mindspore/ccsrc/runtime/device/ascend/ascend_kernel_runtime.cc
  3. +1
    -0
      mindspore/ccsrc/runtime/device/ascend/ascend_kernel_runtime.h
  4. +1
    -5
      mindspore/ccsrc/runtime/device/ascend/executor/hccl_dynamic_kernel.cc

+ 2
- 0
mindspore/ccsrc/CMakeLists.txt View File

@@ -267,6 +267,8 @@ if (ENABLE_D)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/fwkacllib/lib64)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/add-ons)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/opp/op_impl/built-in/ai_core/tbe/op_tiling)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/nnae/latest/opp/op_impl/built-in/ai_core/tbe/op_tiling)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/Ascend/ascend-toolkit/latest/opp/op_impl/built-in/ai_core/tbe/op_tiling)
elseif (ENABLE_GPU)
set(MINDSPORE_RPATH ${MINDSPORE_RPATH}:/usr/local/cuda/lib64)
endif ()


+ 6
- 0
mindspore/ccsrc/runtime/device/ascend/ascend_kernel_runtime.cc View File

@@ -316,6 +316,7 @@ bool AscendKernelRuntime::Load(session::KernelGraph *graph, bool is_task_sink) {
if (!is_task_sink) {
return true;
}
rtCtxSetCurrent(rt_context_hccl_);
// Do HcomExecutorInitialize
if (graph->is_dynamic_shape() && !HcclExecutorManager::GetInstance().Initialize()) {
MS_LOG(ERROR) << "Init Hccl Executor Failed";
@@ -651,6 +652,11 @@ bool AscendKernelRuntime::InitDevice() {
}
}

ret = rtCtxGetCurrent(&rt_context_hccl_);
if (ret != RT_ERROR_NONE || rt_context_hccl_ == nullptr) {
MS_LOG(ERROR) << "Call rtCtxGetCurrent failed, ret[" << ret << "]";
}

ret = rtCtxCreate(&rt_context_, 0, device_id_);
if (ret != RT_ERROR_NONE) {
MS_EXCEPTION(DeviceProcessError) << "Call rtCtxCreate, ret[" << static_cast<int>(ret) << "]";


+ 1
- 0
mindspore/ccsrc/runtime/device/ascend/ascend_kernel_runtime.h View File

@@ -76,6 +76,7 @@ class AscendKernelRuntime : public KernelRuntime {
void LaunchDataDump(GraphId graph_id);

rtContext_t rt_context_{nullptr};
rtContext_t rt_context_hccl_{nullptr};
bool initialized_{false};
unordered_map<GraphId, vector<std::shared_ptr<TaskInfo>>> task_map_;
unordered_map<GraphId, std::shared_ptr<ge::model_runner::DavinciModel>> graph_model_map_;


+ 1
- 5
mindspore/ccsrc/runtime/device/ascend/executor/hccl_dynamic_kernel.cc View File

@@ -87,11 +87,7 @@ void HcclDynamicKernel::StaticShapeExecute() {

void HcclDynamicKernel::Execute() {
MS_LOG(INFO) << "Start Execute";
if (!is_dynamic_shape_) {
MS_LOG(INFO) << "Not Dynamic, call hcom api";
StaticShapeExecute();
return;
}

auto handle = HcclExecutorManager::GetInstance().handle();
auto EnqueueHcomOperation =
(HcclResult(*)(ge::HcomOpertion, std::function<void(HcclResult status)>))dlsym(handle, "EnqueueHcomOpertion");


Loading…
Cancel
Save