Skip to content

Commit

Permalink
fix: tests bench --opt=all and tests all --no-acvp
Browse files Browse the repository at this point in the history
Signed-off-by: Thing-han, Lim <[email protected]>
  • Loading branch information
potsrevennil committed Nov 13, 2024
1 parent f5929ab commit 3113ddb
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions scripts/lib/mlkem_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,15 +594,23 @@ def bench(
else:
exec_wrapper = f"taskpolicy -c {mac_taskpolicy}"

if self.compile:
t.compile(self.opt, extra_make_args=[f"CYCLES={cycles}"])

if self.run:
if self.opt.lower() == "all":
# NOTE: We haven't yet decided how to output both opt/no-opt benchmark results
# NOTE: We haven't yet decided how to output both opt/no-opt benchmark results
if self.opt.lower() == "all":
if self.compile:
t.compile(False, extra_make_args=[f"CYCLES={cycles}"])
if self.run:
self._run_bench(t, False, run_as_root, exec_wrapper)
if self.compile:
t.compile(True, extra_make_args=[f"CYCLES={cycles}"])
if self.run:
resultss = self._run_bench(t, True, run_as_root, exec_wrapper)
else:
else:
if self.compile:
t.compile(
True if self.opt.lower() == "opt" else False,
extra_make_args=[f"CYCLES={cycles}"],
)
if self.run:
resultss = self._run_bench(
t,
True if self.opt.lower() == "opt" else False,
Expand Down Expand Up @@ -654,7 +662,7 @@ def all(opt: bool):
*([self._func.compile] if func else []),
*([self._nistkat.compile] if nistkat else []),
*([self._kat.compile] if kat else []),
*([self._acvp.compile] if kat else []),
*([self._acvp.compile] if acvp else []),
]

for f in compiles:
Expand Down

0 comments on commit 3113ddb

Please sign in to comment.