Browse Source

sync runtime head

tags/v1.3.0
zhou_chao1993 3 years ago
parent
commit
e552726d1d
3 changed files with 26 additions and 4 deletions
  1. +0
    -4
      ge/common/dump/opdebug_register.cc
  2. +4
    -0
      tests/depends/runtime/src/runtime_stub.cc
  3. +22
    -0
      third_party/fwkacllib/inc/runtime/stream.h

+ 0
- 4
ge/common/dump/opdebug_register.cc View File

@@ -80,13 +80,11 @@ Status OpdebugRegister::RegisterDebugForStream(rtStream_t stream, uint32_t op_de

uint32_t debug_stream_id = 0;
uint32_t debug_task_id = 0;
#ifdef ONLY_COMPILE_OPEN_SRC
auto rt_ret = rtDebugRegisterForStream(stream, op_debug_mode, op_debug_addr_, &debug_stream_id, &debug_task_id);
if (rt_ret != RT_ERROR_NONE) {
GELOGE(RT_FAILED, "rtDebugRegisterForStream error, ret: 0x%X", rt_ret);
return RT_ERROR_TO_GE_STATUS(rt_ret);
}
#endif
GELOGD("debug_task_id:%u, debug_stream_id:%u in stream overflow.", debug_task_id, debug_stream_id);
data_dumper.SaveOpDebugId(debug_task_id, debug_stream_id, p2p_debug_addr_, true);
return SUCCESS;
@@ -94,7 +92,6 @@ Status OpdebugRegister::RegisterDebugForStream(rtStream_t stream, uint32_t op_de

void OpdebugRegister::UnregisterDebugForStream(rtStream_t stream) {
rtError_t rt_ret = RT_ERROR_NONE;
#ifdef ONLY_COMPILE_OPEN_SRC
if (stream != nullptr) {
GELOGD("start call rtDebugUnRegisterForStream in unknown shape over flow.");
rt_ret = rtDebugUnRegisterForStream(stream);
@@ -102,7 +99,6 @@ void OpdebugRegister::UnregisterDebugForStream(rtStream_t stream) {
GELOGW("rtDebugUnRegisterForStream failed, ret: 0x%X", rt_ret);
}
}
#endif

if (op_debug_addr_ != nullptr) {
rt_ret = rtFree(op_debug_addr_);


+ 4
- 0
tests/depends/runtime/src/runtime_stub.cc View File

@@ -435,3 +435,7 @@ rtError_t rtGetTaskIdAndStreamID(uint32_t *taskId, uint32_t *streamId)
rtError_t rtDebugRegisterForStream(rtStream_t stream, uint32_t flag, const void *addr, uint32_t *streamId, uint32_t *taskId) {
return RT_ERROR_NONE;
}

rtError_t rtDebugUnRegisterForStream(rtStream_t stream) {
return RT_ERROR_NONE;
}

+ 22
- 0
third_party/fwkacllib/inc/runtime/stream.h View File

@@ -189,6 +189,28 @@ RTS_API rtError_t rtStreamActive(rtStream_t activeStream, rtStream_t stream);
*/
RTS_API rtError_t rtStreamSwitchN(void *ptr, uint32_t size, void *valuePtr, rtStream_t *trueStreamPtr,
uint32_t elementSize, rtStream_t stream, rtSwitchDataType_t dataType);

/*
* @ingroup dvrt_stream
* @brief enable debug for dump overflow exception with stream
* @param [in] addr: ddr address of kernel exception dumpped
* @param [in] stream: stream handle
* @param [in] flag: debug flag
* @return RT_ERROR_NONE for ok
* @return RT_ERROR_INVALID_VALUE for error input
*/
RTS_API rtError_t rtDebugRegisterForStream(rtStream_t stream, uint32_t flag, const void *addr,
uint32_t *streamId, uint32_t *taskId);

/*
* @ingroup rt_model
* @brief disable debug for dump overflow exception with stream
* @param [in] stream: stream handle
* @return RT_ERROR_NONE for ok
* @return RT_ERROR_INVALID_VALUE for error input
*/
RTS_API rtError_t rtDebugUnRegisterForStream(rtStream_t stream);

#if defined(__cplusplus) && !defined(COMPILE_OMG_PACKAGE)
}
#endif


Loading…
Cancel
Save