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

Updating dumpOutput in utils

parent ab92cad0
No related branches found
No related tags found
No related merge requests found
...@@ -586,14 +586,14 @@ float computePSNRViolation(void* gold_ptr, void* approx_ptr, float PSNR_threshol ...@@ -586,14 +586,14 @@ float computePSNRViolation(void* gold_ptr, void* approx_ptr, float PSNR_threshol
} }
void dumpOutput(void* output_ptr){ void dumpOutput(void* output_ptr, const char* file_name){
struct Tensor* out_tensor = (struct Tensor*) output_ptr; struct Tensor* out_tensor = (struct Tensor*) output_ptr;
size_t size_in_bytes = out_tensor->size_in_bytes; size_t size_in_bytes = out_tensor->size_in_bytes;
printf ("** Output size = %lu \n", size_in_bytes); printf ("** Output size = %lu \n", size_in_bytes);
float* host_data = (float*) out_tensor->host_data; float* host_data = (float*) out_tensor->host_data;
FILE* fd = fopen("output.bin", "w+"); FILE* fd = fopen(file_name, "w+");
fwrite(host_data, 1, size_in_bytes, fd); fwrite(host_data, 1, size_in_bytes, fd);
fclose(fd); fclose(fd);
} }
......
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