summaryrefslogtreecommitdiff
path: root/VA/host
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2023-11-20 14:44:48 +0100
committerBirte Kristina Friesel <birte.friesel@uos.de>2023-11-20 14:44:48 +0100
commita991be525c044a7795a82076e60946bda3c6e408 (patch)
tree86bebdefee87850d99bd2b9a06f9d2d8fe426bda /VA/host
parentc25fe499a8595959a33406ffafb89847fed729bb (diff)
VA: more detail output
Diffstat (limited to 'VA/host')
-rw-r--r--VA/host/app.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/VA/host/app.c b/VA/host/app.c
index 2812a6d..98cd782 100644
--- a/VA/host/app.c
+++ b/VA/host/app.c
@@ -64,14 +64,20 @@ int main(int argc, char **argv) {
DPU_ASSERT(dpu_probe_init("energy_probe", &probe));
#endif
-#if !WITH_ALLOC_OVERHEAD
+ printf("WITH_ALLOC_OVERHEAD=%d WITH_LOAD_OVERHEAD=%d WITH_FREE_OVERHEAD=%d\n", WITH_ALLOC_OVERHEAD, WITH_LOAD_OVERHEAD, WITH_FREE_OVERHEAD);
+
// Allocate DPUs and load binary
+#if !WITH_ALLOC_OVERHEAD
DPU_ASSERT(dpu_alloc(NR_DPUS, NULL, &dpu_set));
+ timer.time[0] = 0; // alloc
+#endif
+#if !WITH_LOAD_OVERHEAD
DPU_ASSERT(dpu_load(dpu_set, DPU_BINARY, NULL));
DPU_ASSERT(dpu_get_nr_dpus(dpu_set, &nr_of_dpus));
assert(nr_of_dpus == NR_DPUS);
- timer.time[0] = 0; // alloc
timer.time[1] = 0; // load
+#endif
+#if !WITH_FREE_OVERHEAD
timer.time[6] = 0; // free
#endif
@@ -109,6 +115,8 @@ int main(int argc, char **argv) {
if(rep >= p.n_warmup) {
stop(&timer, 0);
}
+#endif
+#if WITH_LOAD_OVERHEAD
if(rep >= p.n_warmup) {
start(&timer, 1, 0);
}
@@ -205,14 +213,18 @@ int main(int argc, char **argv) {
}
#if WITH_ALLOC_OVERHEAD
+#if WITH_FREE_OVERHEAD
if(rep >= p.n_warmup) {
start(&timer, 6, 0);
}
+#endif
DPU_ASSERT(dpu_free(dpu_set));
+#if WITH_FREE_OVERHEAD
if(rep >= p.n_warmup) {
stop(&timer, 6);
}
#endif
+#endif
// Check output
bool status = true;
@@ -241,15 +253,25 @@ int main(int argc, char **argv) {
input_size * 3 * sizeof(T) / timer.time[2],
input_size * 3 * sizeof(T) / (timer.time[4]),
input_size * 3 * sizeof(T) / (timer.time[0] + timer.time[1] + timer.time[3] + timer.time[4] + timer.time[5] + timer.time[6]));
- printf(" throughput_cpu_MOpps=%f throughput_upmem_kernel_MOpps=%f throughput_upmem_total_MOpps=%f\n",
+ printf(" throughput_upmem_wxr_MBps=%f throughput_upmem_lwxr_MBps=%f throughput_upmem_alwxr_MBps=%f",
+ input_size * 3 * sizeof(T) / (timer.time[3] + timer.time[4] + timer.time[5]),
+ input_size * 3 * sizeof(T) / (timer.time[1] + timer.time[3] + timer.time[4] + timer.time[5]),
+ input_size * 3 * sizeof(T) / (timer.time[0] + timer.time[1] + timer.time[3] + timer.time[4] + timer.time[5]));
+ printf(" throughput_cpu_MOpps=%f throughput_upmem_kernel_MOpps=%f throughput_upmem_total_MOpps=%f",
input_size / timer.time[2],
input_size / (timer.time[4]),
input_size / (timer.time[0] + timer.time[1] + timer.time[3] + timer.time[4] + timer.time[5] + timer.time[6]));
+ printf(" throughput_upmem_wxr_MBps=%f throughput_upmem_lwxr_MBps=%f throughput_upmem_alwxr_MBps=%f\n",
+ input_size / (timer.time[3] + timer.time[4] + timer.time[5]),
+ input_size / (timer.time[1] + timer.time[3] + timer.time[4] + timer.time[5]),
+ input_size / (timer.time[0] + timer.time[1] + timer.time[3] + timer.time[4] + timer.time[5]));
}
} else {
printf("[" ANSI_COLOR_RED "ERROR" ANSI_COLOR_RESET "] Outputs differ!\n");
}
}
+ printf("throughput_*_MOpps == n_elements / (+ latency_*_us ...)\n");
+ printf("throughput_*_MBps == 3 * sizeof(e_type) * throughput_*_MOpps \n");
// Print timing results
/*