Browse Source

DTS:DTS2020101202436

Description:Support model_exit in GE
Team:HISI_SW
Feature or Bugfix:Feature
tags/v1.1.0
l00444296 4 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");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
*/

#ifndef __CCE_RUNTIME_BASE_H__
#define __CCE_RUNTIME_BASE_H__
@@ -100,6 +100,9 @@ typedef enum tagRtError {
RT_ERROR_MODEL_ID,
RT_ERROR_MODEL_EXE_FAILED,
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_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");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
*/

#ifndef __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_STREAM_LABEL_SWITCH_BY_INDEX,
RT_MODEL_TASK_STREAM_LABEL_GOTO,
RT_MODEL_TASK_MODEL_EXIT,
} rtModelTaskType_t;

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

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


typedef struct tagrtStreamLabelSwitchByIndexTask_t {
uint64_t indexPtr;
uint64_t labelInfoPtr;
@@ -256,6 +264,7 @@ typedef struct tagTaskInfo {
rtRdmaSendTaskInfo_t rdmaSendTask;
rtRdmaDbSendTaskInfo_t rdmaDbSendTask;
rtModelEndGraphTaskInfo_t modelEndGraphTask;
rtModelExitTaskInfo_t modelExitTask;
rtStreamSwitchNTaskInfo_t streamSwitchNTask;
rtStreamLabelSwitchByIndexTask_t streamLabelSwitchIndexTask;
rtStreamLabelGotoTask_t streamLabelGotoTask;
@@ -391,6 +400,16 @@ 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
* @brief bind queue
* @param [in] model model to bind
* @param [in] queueId queueId to bind


Loading…
Cancel
Save