diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-01-10 15:52:02 +0100 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-01-10 15:52:02 +0100 |
commit | e749fafbe527ff8a6ea15bd945cc3e8d4800e7ef (patch) | |
tree | 0c0c7e60cdbc382fc5c60aaedfc8a6f99a48d554 | |
parent | 871ab174f5edc761adc0e21bf8fb9ce82b898d26 (diff) |
GEMV baseline: Add optional native=0 flag
-rw-r--r-- | GEMV/baselines/cpu/Makefile | 19 | ||||
-rwxr-xr-x | GEMV/baselines/cpu/run-perf.sh | 2 |
2 files changed, 14 insertions, 7 deletions
diff --git a/GEMV/baselines/cpu/Makefile b/GEMV/baselines/cpu/Makefile index 016d561..60c662c 100644 --- a/GEMV/baselines/cpu/Makefile +++ b/GEMV/baselines/cpu/Makefile @@ -1,17 +1,24 @@ -NUMA ?= 0 -NUMA_MEMCPY ?= 0 -FLAGS = +native ?= 1 +numa ?= 0 +numa_memcpy ?= 0 + +CFLAGS = +LDFLAGS = TYPE ?= double -ifeq (${NUMA}, 1) - FLAGS += -lnuma +ifeq (${native}, 1) + CFLAGS += -march=native +endif + +ifeq (${numa}, 1) + LDFLAGS += -lnuma endif .PHONY: all all: gemv gemv: gemv_openmp.c - gcc -ggdb -Wall -Wextra -pedantic -march=native -O2 -o gemv -fopenmp -DNUMA=${NUMA} -DNUMA_MEMCPY=${NUMA_MEMCPY} -DT=${TYPE} -DTYPE_${TYPE} gemv_openmp.c ${FLAGS} + gcc -ggdb -Wall -Wextra -pedantic ${CFLAGS} -O3 -o gemv -fopenmp -DNUMA=${numa} -DNUMA_MEMCPY=${numa_memcpy} -DT=${TYPE} -DTYPE_${TYPE} gemv_openmp.c ${LDFLAGS} gemv_O0: gemv_openmp.c gcc -o gemv_O0 -fopenmp gemv_openmp.c diff --git a/GEMV/baselines/cpu/run-perf.sh b/GEMV/baselines/cpu/run-perf.sh index c4274c0..5eae822 100755 --- a/GEMV/baselines/cpu/run-perf.sh +++ b/GEMV/baselines/cpu/run-perf.sh @@ -1,6 +1,6 @@ #!/bin/zsh -make -B NUMA=1 +make -B numa=1 OMP_NUM_THREADS=1 perf stat record -o t1.perf -e ${(j:,:):-$(grep -v '^#' ../../../perf-events.txt | cut -d ' ' -f 1)} ./gemv 4 4 4 OMP_NUM_THREADS=4 perf stat record -o t4.perf -e ${(j:,:):-$(grep -v '^#' ../../../perf-events.txt | cut -d ' ' -f 1)} ./gemv 4 4 4 |