summaryrefslogtreecommitdiff
path: root/Microbenchmarks
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2023-05-10 16:15:33 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2023-05-10 16:15:33 +0200
commit428cfab23bb382b084e201ee215c5e813310ac18 (patch)
tree6cadff340c9f2e1f658085c52a8403bd48f0d53f /Microbenchmarks
parent411ac9110820d8d177fca67c19401491d2a83791 (diff)
STREAM: Use upstream MB/s calculation method
Diffstat (limited to 'Microbenchmarks')
-rw-r--r--Microbenchmarks/STREAM/host/app.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Microbenchmarks/STREAM/host/app.c b/Microbenchmarks/STREAM/host/app.c
index 6e0ac16..14b2c4d 100644
--- a/Microbenchmarks/STREAM/host/app.c
+++ b/Microbenchmarks/STREAM/host/app.c
@@ -102,6 +102,12 @@ int main(int argc, char **argv) {
double cc_min = 0;
const unsigned int input_size = p.input_size * nr_of_dpus;
+#if defined(add) || defined(triad)
+ const unsignd int n_arrays = 3;
+#else
+ const unsignd int n_arrays = 2;
+#endif
+
// Input/output allocation
A = malloc(input_size * sizeof(T));
B = malloc(input_size * sizeof(T));
@@ -242,7 +248,7 @@ int main(int argc, char **argv) {
}
if (status) {
printf("[" ANSI_COLOR_GREEN "OK" ANSI_COLOR_RESET "] Outputs are equal\n");
- printf("[::] n_dpus=%d n_tasklets=%d e_benchmark=%-6s e_type=%s e_mem=%s b_unroll=%d | throughput_cpu_MBps=%f throughput_pim_MBps=%f throughput_MBps=%f \n", nr_of_dpus, NR_TASKLETS, benchmark_name, XSTR(T), mem_name, UNROLL, input_size * sizeof(T) / timer.time[0], input_size * sizeof(T) / timer.time[2], input_size * sizeof(T) / (timer.time[1] + timer.time[2] + timer.time[3]));
+ printf("[::] n_dpus=%d n_tasklets=%d e_benchmark=%-6s e_type=%s e_mem=%s b_unroll=%d | throughput_cpu_MBps=%f throughput_pim_MBps=%f throughput_MBps=%f \n", nr_of_dpus, NR_TASKLETS, benchmark_name, XSTR(T), mem_name, UNROLL, input_size * n_arrays * sizeof(T) / timer.time[0], input_size * n_arrays * sizeof(T) / timer.time[2], input_size * n_arrays * sizeof(T) / (timer.time[1] + timer.time[2] + timer.time[3]));
printf("[::] n_dpus=%d n_tasklets=%d e_benchmark=%-6s e_type=%s e_mem=%s b_unroll=%d | throughput_cpu_MOpps=%f throughput_pim_MOpps=%f throughput_MOpps=%f \n", nr_of_dpus, NR_TASKLETS, benchmark_name, XSTR(T), mem_name, UNROLL, input_size / timer.time[0], input_size / timer.time[2], input_size / (timer.time[1] + timer.time[2] + timer.time[3]));
} else {
printf("[" ANSI_COLOR_RED "ERROR" ANSI_COLOR_RESET "] Outputs differ!\n");