code check clean

This commit is contained in:
yuchaojie 2022-03-21 11:40:49 +08:00
parent 0027472b8c
commit 42818b17f6
7 changed files with 15 additions and 3 deletions

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"

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.";
}
}

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

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;

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

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

View File

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