From a77081db39bc6e002ef736a42124cb5c989ca163 Mon Sep 17 00:00:00 2001 From: dongwenbo6 Date: Sat, 17 Feb 2024 16:05:09 +0800 Subject: [PATCH] optimize plog ERROR --- torch_npu/csrc/core/npu/NPUQueue.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/torch_npu/csrc/core/npu/NPUQueue.cpp b/torch_npu/csrc/core/npu/NPUQueue.cpp index b91a5fc507..95efe6e9e0 100644 --- a/torch_npu/csrc/core/npu/NPUQueue.cpp +++ b/torch_npu/csrc/core/npu/NPUQueue.cpp @@ -3,7 +3,7 @@ #include "torch_npu/csrc/core/npu/npu_log.h" #include "torch_npu/csrc/framework/utils/NpuUtils.h" #include "torch_npu/csrc/core/npu/NPUFunctions.h" - +#include "torch_npu/csrc/framework/OpParamMaker.h" #ifndef BUILD_LIBTORCH #include #endif @@ -300,7 +300,19 @@ void Repository::Enqueue(void* cur_paras) { } if (GetStatus() != RUN && GetStatus() != INIT) { - ASCEND_LOGE("Task queue thread is exit, cann't call Enqueue(). !!"); + auto queueParam = static_cast(cur_paras); + auto type = queueParam->paramType; + if (type ==c10_npu::queue::COMPILE_AND_EXECUTE) { + auto cur_paras = static_cast(queueParam->paramVal); + auto op_param = cur_paras->opType; + ASCEND_LOGE("Task queue thread is exit, cann't call Enqueue(). op name is=%s", *op_name); + } else if (type ==c10_npu::queue::ASYNC_MEMCPY) { + auto cur_paras = static_cast(queueParam->paramVal); + ASCEND_LOGE("Task queue thread is exit, cann't call Enqueue(). src=%p, dst=%p", cur_paras->src, cur_paras->dst); + } else { + auto cur_paras = static_cast(queueParam->paramVal); + ASCEND_LOGE("Task queue thread is exit, cann't call Enqueue(). event is=%p", cur_paras->event); + } return; } bool ret = false; -- Gitee