Browse Source

code check clean

r1.7
yuchaojie 4 years ago
parent
commit
42818b17f6
7 changed files with 15 additions and 3 deletions
  1. +2
    -0
      mindspore/ccsrc/backend/common/pass/common_subexpression_elimination.cc
  2. +1
    -1
      mindspore/ccsrc/backend/common/session/executor.cc
  3. +5
    -0
      mindspore/ccsrc/plugin/device/ascend/hal/device/executor/rts/memcpy_rts_dynamic_kernel.cc
  4. +1
    -1
      mindspore/ccsrc/plugin/device/ascend/hal/device/executor/rts/memcpy_rts_dynamic_kernel.h
  5. +4
    -0
      mindspore/ccsrc/plugin/device/ascend/hal/device/ge_runtime/task/aicpu_task.cc
  6. +1
    -1
      mindspore/ccsrc/plugin/device/ascend/optimizer/format_type/merge_cast_to_op.cc
  7. +1
    -0
      tests/ut/cpp/stub/dynamic_shape/dynamic_shape_stub.cc

+ 2
- 0
mindspore/ccsrc/backend/common/pass/common_subexpression_elimination.cc View File

@@ -17,6 +17,8 @@
#include <memory>
#include <vector>
#include <map>
#include <utility>
#include "runtime/device/kernel_info.h"
#include "base/core_ops.h"
#include "utils/flags.h"


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

@@ -181,7 +181,7 @@ Executor::~Executor() {
} catch (const std::exception &e) {
MS_LOG(ERROR) << "Executor call destructor failed: " << e.what();
} catch (...) {
MS_LOG(ERROR) << "KernelGraph call destructor failed";
MS_LOG(ERROR) << "Executor call destructor failed.";
}
}



+ 5
- 0
mindspore/ccsrc/plugin/device/ascend/hal/device/executor/rts/memcpy_rts_dynamic_kernel.cc View File

@@ -22,6 +22,11 @@
namespace mindspore {
namespace device {
namespace ascend {
MemcpyRtsDynamicKernel::~MemcpyRtsDynamicKernel() {
dst_ = nullptr;
src_ = nullptr;
}

void MemcpyRtsDynamicKernel::Execute() {
auto status = aclrtMemcpyAsync(dst_, dest_max_, src_, count_, ACL_MEMCPY_DEVICE_TO_DEVICE, stream_);
if (status != RT_ERROR_NONE) {


+ 1
- 1
mindspore/ccsrc/plugin/device/ascend/hal/device/executor/rts/memcpy_rts_dynamic_kernel.h View File

@@ -27,7 +27,7 @@ class MemcpyRtsDynamicKernel : public DynamicKernel {
MemcpyRtsDynamicKernel(void *stream, const CNodePtr &cnode_ptr, void *dst, uint32_t dest_max, void *src,
uint32_t count)
: DynamicKernel(stream, cnode_ptr), dst_(dst), dest_max_(dest_max), src_(src), count_(count) {}
~MemcpyRtsDynamicKernel() override = default;
~MemcpyRtsDynamicKernel() override;

void UpdateArgs() override {}
void Execute() override;


+ 4
- 0
mindspore/ccsrc/plugin/device/ascend/hal/device/ge_runtime/task/aicpu_task.cc View File

@@ -46,6 +46,10 @@ AicpuTask::AicpuTask(const ModelContext &model_context, const std::shared_ptr<Ai
AicpuTask::~AicpuTask() {
ReleaseRtMem(&args_);
ReleaseRtMem(&ext_info_);
stream_ = nullptr;
args_ = nullptr;
ext_info_ = nullptr;
input_output_addr_ = nullptr;
}

void AicpuTask::Distribute() {


+ 1
- 1
mindspore/ccsrc/plugin/device/ascend/optimizer/format_type/merge_cast_to_op.cc View File

@@ -68,7 +68,7 @@ bool GetNextNodeAndCastIndex(const FuncGraphPtr &graph, const AnfNodePtr &node,
}
auto node_pair = output_node_list->at(0);
*next_node = node_pair.first;
*cast_index = static_cast<size_t>(node_pair.second - 1);
*cast_index = IntToSize(node_pair.second - 1);
return true;
}



+ 1
- 0
tests/ut/cpp/stub/dynamic_shape/dynamic_shape_stub.cc View File

@@ -28,6 +28,7 @@ void HcclDynamicKernel::UpdateArgs() {}
void HcclDynamicKernel::Execute() {}
void HcclDynamicKernel::PostExecute() {}

MemcpyRtsDynamicKernel::~MemcpyRtsDynamicKernel() {}
void MemcpyRtsDynamicKernel::Execute() {}

void ProfilingRtsDynamicKernel::Execute() {}


Loading…
Cancel
Save