|
|
@@ -67,7 +67,7 @@ Status AiCoreOpTask::Init(const OpDesc &op_desc, |
|
|
|
// size,dim1,...,dim8: 9*4=36 |
|
|
|
const size_t kDefaultShapeSize = 36; |
|
|
|
size_t size = kDefaultShapeSize * op_desc.GetOutputsSize(); |
|
|
|
if (size = 0) { |
|
|
|
if (size == 0) { |
|
|
|
GELOGE(PARAM_INVALID, |
|
|
|
"Op [%s] unknown shape type is %d, but outputs size is 0.", |
|
|
|
op_desc.GetName().c_str(), unknown_shape_op_type_); |
|
|
@@ -83,8 +83,8 @@ Status AiCoreOpTask::Init(const OpDesc &op_desc, |
|
|
|
GE_CHK_RT_RET(rtMemcpy(shape_buffer_->GetData(), shape_buffer_->GetSize(), |
|
|
|
default_value.data(), size, |
|
|
|
RT_MEMCPY_HOST_TO_DEVICE)); |
|
|
|
return SUCCESS; |
|
|
|
} |
|
|
|
return SUCCESS; |
|
|
|
} |
|
|
|
|
|
|
|
Status AiCoreOpTask::DoInit(const OpDesc &op_desc, |
|
|
@@ -144,6 +144,7 @@ Status AiCoreOpTask::UpdateOutputsShape(TaskContext &context) const { |
|
|
|
GE_CHK_STATUS_RET_NOLOG(UpdateShapeToOutputDesc(context, shape_new, i)); |
|
|
|
} |
|
|
|
} |
|
|
|
return SUCCESS; |
|
|
|
} |
|
|
|
|
|
|
|
Status AiCoreOpTask::UpdateShapeToOutputDesc(TaskContext &context, |
|
|
|