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 9b5b049f7153c7f5ba550cd41e5a07f552601cd4..f34d521820fdfa56d6d143333e1bde466804da35 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);