| @@ -433,16 +433,13 @@ Status DynamicSingleOp::ExecuteAsync(const vector<GeTensorDesc> &input_desc, | |||||
| if (!inputs_size.empty()) { | if (!inputs_size.empty()) { | ||||
| StreamResource *stream_resource = SingleOpManager::GetInstance().GetResource(resource_id_, stream_); | StreamResource *stream_resource = SingleOpManager::GetInstance().GetResource(resource_id_, stream_); | ||||
| GE_CHK_STATUS_RET_NOLOG(UpdateInputsBufferAddr(stream_resource, stream_, inputs_size, update_buffers)); | GE_CHK_STATUS_RET_NOLOG(UpdateInputsBufferAddr(stream_resource, stream_, inputs_size, update_buffers)); | ||||
| GE_CHK_STATUS_RET_NOLOG(SetHostTensorValue(input_desc, input_buffers)); | |||||
| } | } | ||||
| if (hybrid_model_executor_ != nullptr) { | if (hybrid_model_executor_ != nullptr) { | ||||
| GELOGD("Execute multi-task dynamic single op by hybrid model executor"); | GELOGD("Execute multi-task dynamic single op by hybrid model executor"); | ||||
| if (!inputs_size.empty()) { | |||||
| GE_CHK_STATUS_RET_NOLOG(SetHostTensorValue(input_desc, input_buffers)); | |||||
| } | |||||
| hybrid::HybridModelExecutor::ExecuteArgs args; | hybrid::HybridModelExecutor::ExecuteArgs args; | ||||
| GE_CHK_STATUS_RET_NOLOG(InitHybridModelArgs(update_buffers, output_buffers, input_desc, args)); | GE_CHK_STATUS_RET_NOLOG(InitHybridModelArgs(update_buffers, output_buffers, input_desc, args)); | ||||
| return hybrid_model_executor_->Execute(args); | return hybrid_model_executor_->Execute(args); | ||||
| } | } | ||||
| GE_CHECK_NOTNULL(op_task_); | GE_CHECK_NOTNULL(op_task_); | ||||
| @@ -293,9 +293,6 @@ Status TbeOpTask::UpdateNodeByShape(const vector<GeTensorDesc> &input_desc, cons | |||||
| } | } | ||||
| Status TbeOpTask::EnableDynamicSupport(const NodePtr &node, void *tiling_buffer, uint32_t max_tiling_size) { | Status TbeOpTask::EnableDynamicSupport(const NodePtr &node, void *tiling_buffer, uint32_t max_tiling_size) { | ||||
| node_ = node; | |||||
| tiling_buffer_ = tiling_buffer; | |||||
| max_tiling_size_ = max_tiling_size; | |||||
| if (tiling_buffer != nullptr) { | if (tiling_buffer != nullptr) { | ||||
| uintptr_t *arg_base = nullptr; | uintptr_t *arg_base = nullptr; | ||||
| size_t arg_num = 0; | size_t arg_num = 0; | ||||
| @@ -313,6 +310,9 @@ Status TbeOpTask::EnableDynamicSupport(const NodePtr &node, void *tiling_buffer, | |||||
| } | } | ||||
| arg_base[tiling_index] = reinterpret_cast<uintptr_t>(tiling_buffer); | arg_base[tiling_index] = reinterpret_cast<uintptr_t>(tiling_buffer); | ||||
| } | } | ||||
| node_ = node; | |||||
| tiling_buffer_ = tiling_buffer; | |||||
| max_tiling_size_ = max_tiling_size; | |||||
| return SUCCESS; | return SUCCESS; | ||||
| } | } | ||||
| @@ -481,25 +481,6 @@ void TbeOpTask::GetIoAddr(uintptr_t *&arg_base, size_t &arg_count) { | |||||
| } | } | ||||
| } | } | ||||
| Status AtomicAddrCleanOpTask::EnableDynamicSupport(const NodePtr &node, void *tiling_buffer, uint32_t max_tiling_size) { | |||||
| node_ = node; | |||||
| tiling_buffer_ = tiling_buffer; | |||||
| max_tiling_size_ = max_tiling_size; | |||||
| if (tiling_buffer != nullptr) { | |||||
| uintptr_t *arg_base = nullptr; | |||||
| size_t arg_num = 0; | |||||
| GetIoAddr(arg_base, arg_num); | |||||
| uint32_t tiling_index = atomic_output_indices_.size(); | |||||
| if (arg_num == 0 || arg_num < tiling_index) { | |||||
| GELOGE(ACL_ERROR_GE_INTERNAL_ERROR, "[Check][Size]Tiling index %u, arg number %zu is invalid.", | |||||
| tiling_index, arg_num); | |||||
| return ACL_ERROR_GE_INTERNAL_ERROR; | |||||
| } | |||||
| arg_base[tiling_index] = reinterpret_cast<uintptr_t>(tiling_buffer); | |||||
| } | |||||
| return SUCCESS; | |||||
| } | |||||
| Status AtomicAddrCleanOpTask::UpdateNodeByShape(const vector<GeTensorDesc> &input_desc, | Status AtomicAddrCleanOpTask::UpdateNodeByShape(const vector<GeTensorDesc> &input_desc, | ||||
| const vector<GeTensorDesc> &output_desc) { | const vector<GeTensorDesc> &output_desc) { | ||||
| return SUCCESS; | return SUCCESS; | ||||
| @@ -604,7 +585,7 @@ Status AiCpuBaseTask::SetExtInfoAndType(const std::string &kernel_ext_info, uint | |||||
| int32_t unknown_shape_type_val = 0; | int32_t unknown_shape_type_val = 0; | ||||
| (void) AttrUtils::GetInt(op_desc_, ::ge::ATTR_NAME_UNKNOWN_SHAPE_TYPE, unknown_shape_type_val); | (void) AttrUtils::GetInt(op_desc_, ::ge::ATTR_NAME_UNKNOWN_SHAPE_TYPE, unknown_shape_type_val); | ||||
| GELOGI("Get unknown_type is %d.", unknown_shape_type_val); | |||||
| GELOGD("Get unknown_type is %d.", unknown_shape_type_val); | |||||
| unknown_type_ = static_cast<UnknowShapeOpType>(unknown_shape_type_val); | unknown_type_ = static_cast<UnknowShapeOpType>(unknown_shape_type_val); | ||||
| aicpu_ext_handle_.reset(new(std::nothrow) ::ge::hybrid::AicpuExtInfoHandler(op_desc_->GetName(), | aicpu_ext_handle_.reset(new(std::nothrow) ::ge::hybrid::AicpuExtInfoHandler(op_desc_->GetName(), | ||||
| @@ -97,7 +97,7 @@ class TbeOpTask : public OpTask { | |||||
| const void *GetArgs() const; | const void *GetArgs() const; | ||||
| size_t GetArgSize() const; | size_t GetArgSize() const; | ||||
| const std::string &GetStubName() const; | const std::string &GetStubName() const; | ||||
| virtual Status EnableDynamicSupport(const NodePtr &node, void *tiling_buffer, uint32_t max_tiling_size); | |||||
| Status EnableDynamicSupport(const NodePtr &node, void *tiling_buffer, uint32_t max_tiling_size); | |||||
| const std::string &GetTaskType() const override; | const std::string &GetTaskType() const override; | ||||
| void SetHandle(void *handle); | void SetHandle(void *handle); | ||||
| @@ -149,7 +149,6 @@ class TbeOpTask : public OpTask { | |||||
| class AtomicAddrCleanOpTask : public TbeOpTask { | class AtomicAddrCleanOpTask : public TbeOpTask { | ||||
| public: | public: | ||||
| Status InitAtomicAddrCleanIndices(); | Status InitAtomicAddrCleanIndices(); | ||||
| Status EnableDynamicSupport(const NodePtr &node, void *tiling_buffer, uint32_t max_tiling_size) override; | |||||
| private: | private: | ||||
| Status UpdateNodeByShape(const vector<GeTensorDesc> &input_desc, | Status UpdateNodeByShape(const vector<GeTensorDesc> &input_desc, | ||||
| @@ -425,7 +425,7 @@ Status TbeTaskBuilder::InitTilingInfo(TbeOpTask &task) { | |||||
| GELOGD("[%s] Done allocating tiling buffer, size=%ld.", op_desc_->GetName().c_str(), max_size); | GELOGD("[%s] Done allocating tiling buffer, size=%ld.", op_desc_->GetName().c_str(), max_size); | ||||
| } | } | ||||
| GE_CHK_STATUS_RET_NOLOG(task.EnableDynamicSupport(node_, tiling_buffer, static_cast<uint32_t>(max_size))); | |||||
| task.EnableDynamicSupport(node_, tiling_buffer, static_cast<uint32_t>(max_size)); | |||||
| return SUCCESS; | return SUCCESS; | ||||
| } | } | ||||