From c6ef1bc67845a80a3410369084a32080c6b69d62 Mon Sep 17 00:00:00 2001 From: Hashim Sharif <hsharif3@tyler.cs.illinois.edu> Date: Thu, 14 Feb 2019 17:11:50 -0600 Subject: [PATCH] Fixing bug in readLabels (utils) --- .../test/VISC/DNN_Benchmarks/common/include/tensorUtils.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/test/VISC/DNN_Benchmarks/common/include/tensorUtils.h b/llvm/test/VISC/DNN_Benchmarks/common/include/tensorUtils.h index 3e83c5dd89..6dfca7fc75 100644 --- a/llvm/test/VISC/DNN_Benchmarks/common/include/tensorUtils.h +++ b/llvm/test/VISC/DNN_Benchmarks/common/include/tensorUtils.h @@ -209,7 +209,7 @@ void* readInputTensor(const char* file_name, int data_type, int dim1_size, int d dim3_size, dim4_size); initTensorData(input, tensor_data, size_in_bytes); - compareValues(input, tensor_data, num_elems); + //compareValues(input, tensor_data, num_elems); return input; } @@ -249,7 +249,7 @@ struct Tensor* readTrainedWeights(const char* file_name, int data_type, int dim1 uint8_t* readLabels(const char* labels_file, int num_labels){ - int file_header_size = 8; + //int file_header_size = 8; uint8_t* labels = (uint8_t*) malloc(sizeof(uint8_t) * num_labels); FILE* file = fopen(labels_file, "rb"); if(file == NULL){ @@ -257,9 +257,9 @@ uint8_t* readLabels(const char* labels_file, int num_labels){ abort(); } - fseek(file, file_header_size, SEEK_CUR); // Skipping the file header + //fseek(file, file_header_size, SEEK_CUR); // Skipping the file header size_t bytes_read = fread(labels, 1, sizeof(uint8_t) * num_labels, file); - printf("--labels bytes_read = %zu \n", bytes_read); + printf("*Label bytes_read = %zu \n", bytes_read); return labels; } -- GitLab