summaryrefslogtreecommitdiff
path: root/BS
diff options
context:
space:
mode:
Diffstat (limited to 'BS')
-rw-r--r--BS/Makefile3
-rwxr-xr-xBS/dimes-hetsim-nmc.sh4
-rwxr-xr-xBS/support/common.h3
3 files changed, 7 insertions, 3 deletions
diff --git a/BS/Makefile b/BS/Makefile
index b15f22e..f9c3002 100644
--- a/BS/Makefile
+++ b/BS/Makefile
@@ -1,5 +1,6 @@
NR_DPUS ?= 1
NR_TASKLETS ?= 16
+INPUT_SIZE ?= 2048576
PROBLEM_SIZE ?= 8192 # original 2, wtf
WITH_ALLOC_OVERHEAD ?= 0
WITH_LOAD_OVERHEAD ?= 0
@@ -11,7 +12,7 @@ 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} -DPROBLEM_SIZE=${PROBLEM_SIZE} -DWITH_ALLOC_OVERHEAD=${WITH_ALLOC_OVERHEAD} -DWITH_LOAD_OVERHEAD=${WITH_LOAD_OVERHEAD} -DWITH_FREE_OVERHEAD=${WITH_FREE_OVERHEAD} -DWITH_DPUINFO=${WITH_DPUINFO}
+HOST_FLAGS := ${COMMON_FLAGS} -std=c11 -O3 `dpu-pkg-config --cflags --libs dpu` -DNR_TASKLETS=${NR_TASKLETS} -DNR_DPUS=${NR_DPUS} -DINPUT_SIZE=${INPUT_SIZE} -DPROBLEM_SIZE=${PROBLEM_SIZE} -DWITH_ALLOC_OVERHEAD=${WITH_ALLOC_OVERHEAD} -DWITH_LOAD_OVERHEAD=${WITH_LOAD_OVERHEAD} -DWITH_FREE_OVERHEAD=${WITH_FREE_OVERHEAD} -DWITH_DPUINFO=${WITH_DPUINFO}
DPU_FLAGS := ${COMMON_FLAGS} -O2 -DNR_TASKLETS=${NR_TASKLETS}
QUIET = @
diff --git a/BS/dimes-hetsim-nmc.sh b/BS/dimes-hetsim-nmc.sh
index b51d5cb..f923e79 100755
--- a/BS/dimes-hetsim-nmc.sh
+++ b/BS/dimes-hetsim-nmc.sh
@@ -13,8 +13,8 @@ num_queries_dpu=1048576
run_benchmark_nmc() {
local "$@"
- if make -B NR_DPUS=${nr_dpus} NR_TASKLETS=${nr_tasklets} WITH_ALLOC_OVERHEAD=1 WITH_LOAD_OVERHEAD=1 WITH_FREE_OVERHEAD=1 PROBLEM_SIZE=${num_queries}; then
- bin/bs_host -w 0 -e 100 -i ${input_size}
+ if make -B NR_DPUS=${nr_dpus} NR_TASKLETS=${nr_tasklets} WITH_ALLOC_OVERHEAD=1 WITH_LOAD_OVERHEAD=1 WITH_FREE_OVERHEAD=1 INPUT_SIZE=${input_size} PROBLEM_SIZE=${num_queries}; then
+ bin/bs_host -w 0 -e 100
fi
return $?
}
diff --git a/BS/support/common.h b/BS/support/common.h
index 413a6f8..dbd050c 100755
--- a/BS/support/common.h
+++ b/BS/support/common.h
@@ -10,6 +10,7 @@
#endif
// Transfer size between MRAM and WRAM
+// BL=10 does not work here.
#ifdef BL
#define BLOCK_SIZE_LOG2 BL
#define BLOCK_SIZE (1 << BLOCK_SIZE_LOG2)
@@ -22,7 +23,9 @@
#define DTYPE int64_t
// Vector size
+#ifndef INPUT_SIZE
#define INPUT_SIZE 2048576
+#endif
typedef struct {
uint64_t input_size;