summaryrefslogtreecommitdiff
path: root/BS
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2024-07-04 14:27:12 +0200
committerBirte Kristina Friesel <birte.friesel@uos.de>2024-07-04 14:27:12 +0200
commit03c90ee53ba49c17208a489186e4c1e9849fe976 (patch)
treec568d48019968237b023caf887f495032364adb8 /BS
parent924591b798bd6ded48d993e4ff8dd122941369a4 (diff)
BS: Remove unused SDK_SINGLETHREADED ; compile baseline with -march=native
Diffstat (limited to 'BS')
-rw-r--r--BS/Makefile3
-rw-r--r--BS/baselines/cpu/Makefile2
-rw-r--r--BS/baselines/cpu/bs_omp.c2
-rw-r--r--BS/host/app.c16
4 files changed, 8 insertions, 15 deletions
diff --git a/BS/Makefile b/BS/Makefile
index 90896a8..b15f22e 100644
--- a/BS/Makefile
+++ b/BS/Makefile
@@ -5,14 +5,13 @@ WITH_ALLOC_OVERHEAD ?= 0
WITH_LOAD_OVERHEAD ?= 0
WITH_FREE_OVERHEAD ?= 0
WITH_DPUINFO ?= 0
-SDK_SINGLETHREADED ?= 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} -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} -DSDK_SINGLETHREADED=${SDK_SINGLETHREADED}
+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}
DPU_FLAGS := ${COMMON_FLAGS} -O2 -DNR_TASKLETS=${NR_TASKLETS}
QUIET = @
diff --git a/BS/baselines/cpu/Makefile b/BS/baselines/cpu/Makefile
index 5c540d7..bed2561 100644
--- a/BS/baselines/cpu/Makefile
+++ b/BS/baselines/cpu/Makefile
@@ -9,7 +9,7 @@ endif
all: bs_omp
bs_omp: bs_omp.c
- gcc -Wall -Wextra -pedantic -O2 -DNUMA=${NUMA} bs_omp.c -o bs_omp -fopenmp ${FLAGS}
+ gcc -Wall -Wextra -pedantic -march=native -O2 -DNUMA=${NUMA} bs_omp.c -o bs_omp -fopenmp ${FLAGS}
bs_omp_O0: bs_omp.c
gcc bs_omp.c -o bs_omp_O0 -fopenmp
diff --git a/BS/baselines/cpu/bs_omp.c b/BS/baselines/cpu/bs_omp.c
index f160c58..1b9947c 100644
--- a/BS/baselines/cpu/bs_omp.c
+++ b/BS/baselines/cpu/bs_omp.c
@@ -148,7 +148,7 @@ uint64_t binarySearch(DTYPE * input, uint64_t input_size, DTYPE* querys, unsigne
int status = (result_host);
if (status) {
- printf("[::] BS CPU | n_threads=%d e_type=%s n_elements=%lu"
+ printf("[::] BS-CPU | n_threads=%d e_type=%s n_elements=%lu"
#if NUMA
" numa_node_in=%d numa_node_cpu=%d numa_distance_in_cpu=%d"
#endif
diff --git a/BS/host/app.c b/BS/host/app.c
index f772c17..6d8db6a 100644
--- a/BS/host/app.c
+++ b/BS/host/app.c
@@ -23,12 +23,6 @@
#include <dpu_target_macros.h>
#endif
-#if SDK_SINGLETHREADED
-#define DPU_ALLOC_PROFILE "nrThreadsPerRank=0"
-#else
-#define DPU_ALLOC_PROFILE NULL
-#endif
-
#define XSTR(x) STR(x)
#define STR(x) #x
@@ -97,7 +91,7 @@ int main(int argc, char **argv) {
// Allocate DPUs and load binary
#if !WITH_ALLOC_OVERHEAD
- DPU_ASSERT(dpu_alloc(NR_DPUS, DPU_ALLOC_PROFILE, &dpu_set));
+ DPU_ASSERT(dpu_alloc(NR_DPUS, NULL, &dpu_set));
timer.time[0] = 0; // alloc
#endif
#if !WITH_LOAD_OVERHEAD
@@ -140,7 +134,7 @@ int main(int argc, char **argv) {
if(rep >= p.n_warmup) {
start(&timer, 0, 0);
}
- DPU_ASSERT(dpu_alloc(NR_DPUS, DPU_ALLOC_PROFILE, &dpu_set));
+ DPU_ASSERT(dpu_alloc(NR_DPUS, NULL, &dpu_set));
if(rep >= p.n_warmup) {
stop(&timer, 0);
}
@@ -287,10 +281,10 @@ int main(int argc, char **argv) {
if (status) {
printf("[" ANSI_COLOR_GREEN "OK" ANSI_COLOR_RESET "] results are equal\n");
if (rep >= p.n_warmup) {
- printf("[::] BS UPMEM | n_dpus=%d n_ranks=%d n_tasklets=%d e_type=%s block_size_B=%d n_elements=%lu",
+ printf("[::] BS-UPMEM | n_dpus=%d n_ranks=%d n_tasklets=%d e_type=%s block_size_B=%d n_elements=%lu",
NR_DPUS, nr_of_ranks, NR_TASKLETS, XSTR(DTYPE), BLOCK_SIZE, input_size);
- printf(" b_sdk_singlethreaded=%d b_with_alloc_overhead=%d b_with_load_overhead=%d b_with_free_overhead=%d ",
- SDK_SINGLETHREADED, WITH_ALLOC_OVERHEAD, WITH_LOAD_OVERHEAD, WITH_FREE_OVERHEAD);
+ printf(" with_alloc_overhead=%d b_with_load_overhead=%d b_with_free_overhead=%d ",
+ WITH_ALLOC_OVERHEAD, WITH_LOAD_OVERHEAD, WITH_FREE_OVERHEAD);
printf("| latency_alloc_us=%f latency_load_us=%f latency_cpu_us=%f latency_write_us=%f latency_kernel_us=%f latency_read_us=%f latency_free_us=%f",
timer.time[0],
timer.time[1],