Browse Source

GE supports aicore DEPEND_SHAPE_RANGE op update outputs shape

pull/2008/head
zhujingjing 3 years ago
parent
commit
191171ce8e
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      ge/hybrid/node_executor/aicore/aicore_op_task.cc

+ 1
- 1
ge/hybrid/node_executor/aicore/aicore_op_task.cc View File

@@ -74,7 +74,6 @@ Status AiCoreOpTask::Init(const OpDesc &op_desc, const domi::TaskDef &task_def)
shape_buffer_ = TensorBuffer::Create(allocator, size);
GE_CHECK_NOTNULL(shape_buffer_);
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()]);
GE_CHECK_NOTNULL(host_shape_buffer_);
}
@@ -569,6 +568,7 @@ Status AiCoreOpTask::UpdateArgs(TaskContext &task_context) {
}

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());
GELOGD("Node:%s add shape buffer addr to args.", task_context.GetNodeName());
}


Loading…
Cancel
Save