| @@ -74,7 +74,6 @@ Status AiCoreOpTask::Init(const OpDesc &op_desc, const domi::TaskDef &task_def) | |||||
| shape_buffer_ = TensorBuffer::Create(allocator, size); | shape_buffer_ = TensorBuffer::Create(allocator, size); | ||||
| GE_CHECK_NOTNULL(shape_buffer_); | GE_CHECK_NOTNULL(shape_buffer_); | ||||
| GELOGD("Op [%s] allocate memory for outputs shape success, size=%zu", op_desc.GetName().c_str(), size); | GELOGD("Op [%s] allocate memory for outputs shape success, size=%zu", op_desc.GetName().c_str(), size); | ||||
| GE_CHK_RT_RET(rtMemset(shape_buffer_->GetData(), shape_buffer_->GetSize(), 0, size)); | |||||
| host_shape_buffer_.reset(new (std::nothrow) uint8_t[shape_buffer_->GetSize()]); | host_shape_buffer_.reset(new (std::nothrow) uint8_t[shape_buffer_->GetSize()]); | ||||
| GE_CHECK_NOTNULL(host_shape_buffer_); | GE_CHECK_NOTNULL(host_shape_buffer_); | ||||
| } | } | ||||
| @@ -569,6 +568,7 @@ Status AiCoreOpTask::UpdateArgs(TaskContext &task_context) { | |||||
| } | } | ||||
| if (shape_buffer_ != nullptr) { | if (shape_buffer_ != nullptr) { | ||||
| GE_CHK_RT_RET(rtMemset(shape_buffer_->GetData(), shape_buffer_->GetSize(), 0, size)); | |||||
| arg_base_[index++] = reinterpret_cast<uintptr_t>(shape_buffer_->GetData()); | arg_base_[index++] = reinterpret_cast<uintptr_t>(shape_buffer_->GetData()); | ||||
| GELOGD("Node:%s add shape buffer addr to args.", task_context.GetNodeName()); | GELOGD("Node:%s add shape buffer addr to args.", task_context.GetNodeName()); | ||||
| } | } | ||||