diff --git a/tf_adapter/util/host_queue.cc b/tf_adapter/util/host_queue.cc index 7a9db2563e834f68eeb33de82a2dff08f04d3b94..87a515bf54ebc090dd3dab3d470ccdc6d9ebb850 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));