Skip to content
Snippets Groups Projects
Commit 771cbac6 authored by Hashim Sharif's avatar Hashim Sharif
Browse files

Fixing format specifier warnings

parent ec3bfff9
No related branches found
No related tags found
No related merge requests found
......@@ -16,9 +16,9 @@ void printTensorInfo(void* tensor_ptr){
printf("Successful cudaMalloc \n");
}
printf("tensor dims = %d \n", tensor->dims.num_dims);
printf("dim1_size = %d \n", tensor->dims.dim_sizes[0]);
printf("dim2_size = %d \n", tensor->dims.dim_sizes[1]);
printf("tensor dims = %zu \n", tensor->dims.num_dims);
printf("dim1_size = %zu \n", tensor->dims.dim_sizes[0]);
printf("dim2_size = %zu \n", tensor->dims.dim_sizes[1]);
printf("num_elems = %d \n", tensor->num_elems);
}
......@@ -37,9 +37,9 @@ void dumpWeightsToFile(char* file_name, void* weights_ptr){
abort();
}
printf("size_in_bytes = %d \n", weights->size_in_bytes);
printf("size_in_bytes = %zu \n", weights->size_in_bytes);
size_t bytes_written = fwrite(weights->host_data, 1, weights->size_in_bytes, fp);
printf("bytes_written = %d \n", bytes_written);
printf("bytes_written = %zu\n", bytes_written);
fclose(fp);
}
......@@ -133,9 +133,9 @@ void printTensorDims(void* tensor_ptr){
struct Tensor* tensor = (struct Tensor*) tensor_ptr;
printf("Num_elems = %d \n", tensor->num_elems);
printf("Num_elems = %zu \n", tensor->num_elems);
for (int i = 0; i < tensor->dims.num_dims; i++){
printf("dim[%d] = %d \n", i, tensor->dims.dim_sizes[i]);
printf("dim[%d] = %zu \n", i, tensor->dims.dim_sizes[i]);
}
}
......@@ -259,7 +259,7 @@ uint8_t* readLabels(char* labels_file, int num_labels){
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 = %d \n", bytes_read);
printf("--labels bytes_read = %zu \n", bytes_read);
return labels;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment