From 527e7d06a2ab4d3db9da2401de072f0a39f6ef23 Mon Sep 17 00:00:00 2001 From: Hashim Sharif <hsharif3@miranda.cs.illinois.edu> Date: Tue, 27 Apr 2021 22:51:10 -0500 Subject: [PATCH] Removing ugly print from tensor utils --- .../tensor_runtime/include/tensorUtils.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/hpvm/projects/hpvm-tensor-rt/tensor_runtime/include/tensorUtils.h b/hpvm/projects/hpvm-tensor-rt/tensor_runtime/include/tensorUtils.h index d4961d19b9..22f202ef03 100644 --- a/hpvm/projects/hpvm-tensor-rt/tensor_runtime/include/tensorUtils.h +++ b/hpvm/projects/hpvm-tensor-rt/tensor_runtime/include/tensorUtils.h @@ -43,13 +43,13 @@ void dumpWeightsToFile(char *file_name, void *weights_ptr) { abort(); } - // printf("size_in_bytes = %lu \n", weights->size_in_bytes); size_t bytes_written = fwrite(weights->host_data, 1, weights->size_in_bytes, fp); - // printf("bytes_written = %lu \n", bytes_written); + fclose(fp); } + void fillTensorWithOnes(void *tensor_ptr) { struct Tensor *tensor = (struct Tensor *)tensor_ptr; @@ -201,7 +201,7 @@ struct Tensor *readTrainedWeights(const char *file_name, int data_type, long int size_in_bytes = type_size * dim1_size * dim2_size * dim3_size * dim4_size; float *tensor_data = (float *)malloc(sizeof(float) * num_elems); - printf("size_in_bytes = %lu \n", size_in_bytes); + //printf("size_in_bytes = %lu \n", size_in_bytes); int file_header_size = 0; @@ -214,9 +214,6 @@ struct Tensor *readTrainedWeights(const char *file_name, int data_type, fseek(file, file_header_size, SEEK_CUR); // Skipping the file header size_t bytes_read = fread(tensor_data, 1, size_in_bytes, file); - // printf("size in bytes = %lu, bytes read = %lu \n", size_in_bytes, - // bytes_read); - fclose(file); struct Tensor *weights = (struct Tensor *)create4DTensor( @@ -254,7 +251,6 @@ struct Tensor *readInputBatch(const char *file_name, long data_type, fclose(file); - // printf ("FIXED input BATCH read \n"); struct Tensor *weights = (struct Tensor *)create4DTensor( data_type, nchw, dim1_size, dim2_size, dim3_size, dim4_size); -- GitLab