summaryrefslogtreecommitdiff
path: root/Microbenchmarks/STREAM
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2023-05-11 14:19:13 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2023-05-11 14:19:13 +0200
commitd4abf7974175fd74bd9e0bbd382b8cb6318fceea (patch)
tree216cb6f1237dca4b4c1d7d075bbd864f6ff9ae2c /Microbenchmarks/STREAM
parent6f694912e0828e5cede9df1b44b58e42e28e9d7f (diff)
STREAM: some quality of life improvements
Diffstat (limited to 'Microbenchmarks/STREAM')
-rw-r--r--Microbenchmarks/STREAM/Makefile14
-rw-r--r--Microbenchmarks/STREAM/host/app.c7
-rwxr-xr-xMicrobenchmarks/STREAM/run.sh1
3 files changed, 15 insertions, 7 deletions
diff --git a/Microbenchmarks/STREAM/Makefile b/Microbenchmarks/STREAM/Makefile
index 12fd65c..067e7f9 100644
--- a/Microbenchmarks/STREAM/Makefile
+++ b/Microbenchmarks/STREAM/Makefile
@@ -14,18 +14,24 @@ COMMON_FLAGS = -Wall -Wextra -O2 -I${COMMON_INCLUDES} -DNR_DPUS=${NR_DPUS} -DNR_
HOST_FLAGS = ${COMMON_FLAGS} -std=c11 `dpu-pkg-config --cflags --libs dpu`
DPU_FLAGS = ${COMMON_FLAGS} -flto
+QUIET = @
+
+ifdef verbose
+ QUIET =
+endif
+
all: bin/dpu_code bin/host_code
bin:
- mkdir -p bin
+ ${QUIET}mkdir -p bin
bin/dpu_code: ${DPU_SOURCES}
- dpu-upmem-dpurte-clang ${DPU_FLAGS} ${DPU_SOURCES} -o $@
+ ${QUIET}dpu-upmem-dpurte-clang ${DPU_FLAGS} ${DPU_SOURCES} -o $@
bin/host_code: ${HOST_SOURCES}
- ${CC} ${HOST_FLAGS} ${HOST_SOURCES} -o $@
+ ${QUIET}${CC} ${HOST_FLAGS} ${HOST_SOURCES} -o $@
clean:
- ${RM} -f bin/dpu_code bin/host_code
+ ${QUIET}${RM} -f bin/dpu_code bin/host_code
.PHONY: all clean
diff --git a/Microbenchmarks/STREAM/host/app.c b/Microbenchmarks/STREAM/host/app.c
index 55e9d0f..d77d44b 100644
--- a/Microbenchmarks/STREAM/host/app.c
+++ b/Microbenchmarks/STREAM/host/app.c
@@ -141,7 +141,7 @@ int main(int argc, char **argv) {
if(rep >= p.n_warmup)
stop(&timer, 0);
- printf("Load input data\n");
+ //printf("Load input data\n");
if(rep >= p.n_warmup)
start(&timer, 1, 0);
// Input arguments
@@ -161,7 +161,7 @@ int main(int argc, char **argv) {
if(rep >= p.n_warmup)
stop(&timer, 1);
- printf("Run program on DPU(s) \n");
+ //printf("Run program on DPU(s) \n");
// Run DPU kernel
if(rep >= p.n_warmup)
start(&timer, 2, 0);
@@ -181,7 +181,7 @@ int main(int argc, char **argv) {
}
#endif
- printf("Retrieve results\n");
+ //printf("Retrieve results\n");
if(rep >= p.n_warmup)
start(&timer, 3, 0);
dpu_results_t results[nr_of_dpus];
@@ -266,6 +266,7 @@ int main(int argc, char **argv) {
print(&timer, 2, p.n_reps);
printf("DPU-CPU ");
print(&timer, 3, p.n_reps);
+ printf("\n");
// Deallocation
free(A);
diff --git a/Microbenchmarks/STREAM/run.sh b/Microbenchmarks/STREAM/run.sh
index 26e0339..887d960 100755
--- a/Microbenchmarks/STREAM/run.sh
+++ b/Microbenchmarks/STREAM/run.sh
@@ -18,6 +18,7 @@ for nr_dpus in 1 2 4 8 16 32 64 128 256 512; do
for op in copy copyw add scale triad; do
for nr_tasklets in 1 2 3 4 6 8 10 12 16 20 24; do
for dt in uint8_t uint16_t uint32_t uint64_t float double; do
+ echo
if make -B MEM=${mem} OP=${op} NR_DPUS=${nr_dpus} NR_TASKLETS=${nr_tasklets} BL=10 T=${dt} UNROLL=1 \
|| make -B MEM=${mem} OP=${op} NR_DPUS=${nr_dpus} NR_TASKLETS=${nr_tasklets} BL=10 T=${dt} UNROLL=0; then
bin/host_code -w 0 -e 20 -i 2097152