From e9cdd8def9e8790f49db2ecba667a74e99ca69f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=8F=E5=90=8D=E9=A6=99?= Date: Mon, 31 Mar 2025 21:58:50 +0800 Subject: [PATCH] fix destruction order --- tf_adapter_2.x/npu_device/core/npu_hdc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tf_adapter_2.x/npu_device/core/npu_hdc.cpp b/tf_adapter_2.x/npu_device/core/npu_hdc.cpp index 9b5b049f7..f34d52182 100644 --- a/tf_adapter_2.x/npu_device/core/npu_hdc.cpp +++ b/tf_adapter_2.x/npu_device/core/npu_hdc.cpp @@ -350,7 +350,7 @@ tensorflow::Status HdcChannel::SendTensorsByAcl(acltdtTensorType acl_type, auto acl_status = ACL_ERROR_NONE; do { acl_status = acltdtSendTensor(handle_.acl_handle, acl_dataset, -1 /* no timeout */); - } while (acl_status == ACL_ERROR_RT_QUEUE_FULL); + } while ((acl_status == ACL_ERROR_RT_QUEUE_FULL) && (!destroyed_)); TF_RETURN_IF_ERROR(DestroyAclDataset(acl_dataset)); if (acl_status != ACL_ERROR_NONE) { return tensorflow::errors::Internal("Acl send data failed, acl status:", acl_status); -- Gitee