From b2bf7bc96e6f7ee10890c8b32414d8f4bd2ee23d Mon Sep 17 00:00:00 2001 From: wangxiaotian22 Date: Tue, 6 May 2025 11:34:31 +0800 Subject: [PATCH] fix code check --- tf_adapter/util/host_queue.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tf_adapter/util/host_queue.cc b/tf_adapter/util/host_queue.cc index 7a9db2563..87a515bf5 100644 --- a/tf_adapter/util/host_queue.cc +++ b/tf_adapter/util/host_queue.cc @@ -98,6 +98,9 @@ Status GetDataTypeByTensorType(acltdtTensorType tensor_type, int32_t &data_type) Status AddDataItemInfo(acltdtTensorType tdt_data_type, int32_t tensor_type, const int64_t *dims, size_t dim_size, void *data_ptr, uint64_t data_len, std::vector &items) { + if (dim_size != 0UL) { + CHECK_NOTNULL(dims); + } DataItemInfo item = {}; int32_t data_type = 0; TF_RETURN_IF_ERROR(GetDataTypeByTensorType(tdt_data_type, data_type)); -- Gitee