Skip to content

Commit

Permalink
run benchmark for cpu cortex-a72 only
Browse files Browse the repository at this point in the history
Signed-off-by: Thing-han, Lim <[email protected]>
  • Loading branch information
potsrevennil committed Jun 19, 2024
1 parent 8550bf5 commit 3101acb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
- name: Run benchmark
shell: nix develop .#ci -c bash -e {0}
run: |
tests bench -c PMU -v
tests bench -c PMU --cpu cortex-a72 -v
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ INCLUDE_FIPS202 = -I fips202
INCLUDE_MLKEM = -I mlkem
INCLUDE_RANDOM = -I randombytes
INCLUDE_NISTRANDOM = -I test/nistrng
CFLAGS += -Wall -Wextra -Wpedantic -Werror -Wmissing-prototypes -Wredundant-decls \
override CFLAGS += -Wall -Wextra -Wpedantic -Werror -Wmissing-prototypes -Wredundant-decls \
-Wshadow -Wpointer-arith -Wno-unknown-pragmas -O3 -fomit-frame-pointer -pedantic \
${INCLUDE_MLKEM} ${INCLUDE_FIPS202}

HOST_PLATFORM := $(shell uname -s)-$(shell uname -m)
ifeq ($(HOST_PLATFORM),Linux-x86_64)
CFLAGS += -static
override CFLAGS += -static
endif

CYCLES ?= NO

ifeq ($(CYCLES),PMU)
CFLAGS += -DPMU_CYCLES
override CFLAGS += -DPMU_CYCLES
endif

ifeq ($(CYCLES),PERF)
CFLAGS += -DPERF_CYCLES
override CFLAGS += -DPERF_CYCLES
endif

CFLAGS_RANDOMBYTES = ${CFLAGS} ${INCLUDE_RANDOM}
Expand Down
2 changes: 1 addition & 1 deletion scripts/tests
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def bench(force_qemu, verbose, cycles, cpu):
lambda _: True,
force_qemu,
verbose,
f"CYCLES={cycles}",
[f"CYCLES={cycles}", f"CFLAGS=-mcpu={cpu}"],
)
for scheme, result in results.items():
print(scheme)
Expand Down

0 comments on commit 3101acb

Please sign in to comment.