Browse Source

DTS:DTS2020101202436

Description:Support model_exit in GE
Team:HISI_SW
Feature or Bugfix:Feature
tags/v1.1.0
l00444296 5 years ago
parent
commit
57c208f5a7
2 changed files with 32 additions and 10 deletions
  1. +8
    -5
      third_party/fwkacllib/inc/runtime/base.h
  2. +24
    -5
      third_party/fwkacllib/inc/runtime/rt_model.h

+ 8
- 5
third_party/fwkacllib/inc/runtime/base.h View File

@@ -1,18 +1,18 @@
/** /**
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Copyright 2020 Huawei Technologies Co., Ltd
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/
*/


#ifndef __CCE_RUNTIME_BASE_H__ #ifndef __CCE_RUNTIME_BASE_H__
#define __CCE_RUNTIME_BASE_H__ #define __CCE_RUNTIME_BASE_H__
@@ -100,6 +100,9 @@ typedef enum tagRtError {
RT_ERROR_MODEL_ID, RT_ERROR_MODEL_ID,
RT_ERROR_MODEL_EXE_FAILED, RT_ERROR_MODEL_EXE_FAILED,
RT_ERROR_END_OF_SEQUENCE, // end of sequence RT_ERROR_END_OF_SEQUENCE, // end of sequence
RT_ERROR_MODEL_EXIT,
RT_ERROR_MODEL_EXIT_STREAM_UNBIND,
RT_ERROR_MODEL_EXIT_ID,


RT_ERROR_EVENT_BASE = 0x07050000, RT_ERROR_EVENT_BASE = 0x07050000,
RT_ERROR_EVENT_NULL, RT_ERROR_EVENT_NULL,


+ 24
- 5
third_party/fwkacllib/inc/runtime/rt_model.h View File

@@ -1,18 +1,18 @@
/** /**
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Copyright 2020 Huawei Technologies Co., Ltd
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/
*/


#ifndef __CCE_RUNTIME_MODEL_H__ #ifndef __CCE_RUNTIME_MODEL_H__
#define __CCE_RUNTIME_MODEL_H__ #define __CCE_RUNTIME_MODEL_H__
@@ -49,6 +49,7 @@ typedef enum tagModelTaskType {
RT_MODEL_TASK_MEMCPY_ADDR_ASYNC, RT_MODEL_TASK_MEMCPY_ADDR_ASYNC,
RT_MODEL_TASK_STREAM_LABEL_SWITCH_BY_INDEX, RT_MODEL_TASK_STREAM_LABEL_SWITCH_BY_INDEX,
RT_MODEL_TASK_STREAM_LABEL_GOTO, RT_MODEL_TASK_STREAM_LABEL_GOTO,
RT_MODEL_TASK_MODEL_EXIT,
} rtModelTaskType_t; } rtModelTaskType_t;


typedef enum tagModelStreamType { typedef enum tagModelStreamType {
@@ -224,6 +225,13 @@ typedef struct tagrtModelEndGraphTaskInfo {
uint32_t reserved[8]; uint32_t reserved[8];
} rtModelEndGraphTaskInfo_t; } rtModelEndGraphTaskInfo_t;


typedef struct tagrtModelExitInfo {
uint32_t modelId;
uint32_t streamId;
uint32_t reserved[8];
} rtModelExitTaskInfo_t;


typedef struct tagrtStreamLabelSwitchByIndexTask_t { typedef struct tagrtStreamLabelSwitchByIndexTask_t {
uint64_t indexPtr; uint64_t indexPtr;
uint64_t labelInfoPtr; uint64_t labelInfoPtr;
@@ -256,6 +264,7 @@ typedef struct tagTaskInfo {
rtRdmaSendTaskInfo_t rdmaSendTask; rtRdmaSendTaskInfo_t rdmaSendTask;
rtRdmaDbSendTaskInfo_t rdmaDbSendTask; rtRdmaDbSendTaskInfo_t rdmaDbSendTask;
rtModelEndGraphTaskInfo_t modelEndGraphTask; rtModelEndGraphTaskInfo_t modelEndGraphTask;
rtModelExitTaskInfo_t modelExitTask;
rtStreamSwitchNTaskInfo_t streamSwitchNTask; rtStreamSwitchNTaskInfo_t streamSwitchNTask;
rtStreamLabelSwitchByIndexTask_t streamLabelSwitchIndexTask; rtStreamLabelSwitchByIndexTask_t streamLabelSwitchIndexTask;
rtStreamLabelGotoTask_t streamLabelGotoTask; rtStreamLabelGotoTask_t streamLabelGotoTask;
@@ -389,6 +398,16 @@ RTS_API rtError_t rtModelExecutorSet(rtModel_t model, uint8_t flags);
*/ */
RTS_API rtError_t rtModelAbort(rtModel_t model); RTS_API rtError_t rtModelAbort(rtModel_t model);


/**
* @ingroup rt_model
* @brief end graph task to model default stream
* @param [in] model model to execute
* @param [in] end graph stream
* @return RT_ERROR_NONE for ok
* @return RT_ERROR_INVALID_VALUE for error input
*/
RTS_API rtError_t rtModelExit(rtModel_t model, rtStream_t stream);

/** /**
* @ingroup rt_model * @ingroup rt_model
* @brief bind queue * @brief bind queue


Loading…
Cancel
Save