summaryrefslogtreecommitdiff
path: root/VA
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
parentc25fe499a8595959a33406ffafb89847fed729bb (diff)
VA: more detail output
Diffstat (limited to 'VA')
-rw-r--r--VA/Makefile4
-rw-r--r--VA/host/app.c28
-rwxr-xr-xVA/run.sh8
3 files changed, 33 insertions, 7 deletions
diff --git a/VA/Makefile b/VA/Makefile
index e5a856d..b3c6199 100644
--- a/VA/Makefile
+++ b/VA/Makefile
@@ -4,13 +4,15 @@ BL ?= 10
TYPE ?= INT32
ENERGY ?= 0
WITH_ALLOC_OVERHEAD ?= 0
+WITH_LOAD_OVERHEAD ?= 0
+WITH_FREE_OVERHEAD ?= 0
COMMON_INCLUDES := support
HOST_SOURCES := $(wildcard host/*.c)
DPU_SOURCES := $(wildcard dpu/*.c)
COMMON_FLAGS := -Wall -Wextra -g -I${COMMON_INCLUDES}
-HOST_FLAGS := ${COMMON_FLAGS} -std=c11 -O3 `dpu-pkg-config --cflags --libs dpu` -DNR_TASKLETS=${NR_TASKLETS} -DNR_DPUS=${NR_DPUS} -DBL=${BL} -D${TYPE} -DENERGY=${ENERGY} -DWITH_ALLOC_OVERHEAD=${WITH_ALLOC_OVERHEAD}
+HOST_FLAGS := ${COMMON_FLAGS} -std=c11 -O3 `dpu-pkg-config --cflags --libs dpu` -DNR_TASKLETS=${NR_TASKLETS} -DNR_DPUS=${NR_DPUS} -DBL=${BL} -D${TYPE} -DENERGY=${ENERGY} -DWITH_ALLOC_OVERHEAD=${WITH_ALLOC_OVERHEAD} -DWITH_LOAD_OVERHEAD=${WITH_LOAD_OVERHEAD} -DWITH_FREE_OVERHEAD=${WITH_FREE_OVERHEAD}
DPU_FLAGS := ${COMMON_FLAGS} -O2 -DNR_TASKLETS=${NR_TASKLETS} -DBL=${BL} -D${TYPE}
QUIET = @
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
/*
diff --git a/VA/run.sh b/VA/run.sh
index e4cedb2..d99287b 100755
--- a/VA/run.sh
+++ b/VA/run.sh
@@ -16,11 +16,13 @@ echo "Revision $(git describe --always)"
for nr_dpus in 1 4 8 16 32 64 128 256 512 768 1024 1536 2048; do
for nr_tasklets in 8 12 16 20 24; do
- for i in 2048 4096 8192 16384 65536 262144 1048576 2621440 167772160; do
+ # 2621440 run-paper-weak
+ # 167772160 run-paper-strong-full (needs at least 20 DPUs)
+ for i in 2048 4096 8192 16384 65536 262144 1048576 2621440 167772160; do
for dt in CHAR SHORT INT32 INT64 FLOAT DOUBLE; do
echo
- if make -B NR_DPUS=${nr_dpus} NR_TASKLETS=${nr_tasklets} BL=10 TYPE=${dt} WITH_ALLOC_OVERHEAD=1; then
- timeout --foreground -k 1m 30m bin/host_code -w 0 -e 100 -i ${i} -x 1 || true
+ if make -B NR_DPUS=${nr_dpus} NR_TASKLETS=${nr_tasklets} BL=10 TYPE=${dt} WITH_ALLOC_OVERHEAD=1 WITH_LOAD_OVERHEAD=1 WITH_FREE_OVERHEAD=1; then
+ timeout --foreground -k 1m 30m bin/host_code -w 0 -e 50 -i ${i} -x 1 || true
fi
done
done