From f5baf3cea3161b8ea7590043b8e82d6f3e5e1562 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Sat, 23 Dec 2023 05:46:51 +0000 Subject: [PATCH] Experiment: Simplify x25519 optimization script --- paper/scripts/slothy_x25519.sh | 81 +++------------------------------- 1 file changed, 7 insertions(+), 74 deletions(-) diff --git a/paper/scripts/slothy_x25519.sh b/paper/scripts/slothy_x25519.sh index de218f25..89c9076d 100755 --- a/paper/scripts/slothy_x25519.sh +++ b/paper/scripts/slothy_x25519.sh @@ -115,29 +115,6 @@ i=2 echo "*** Step 5" i=3 - ${SLOTHY_DIR}/slothy-cli Arm_AArch64 Arm_Cortex_A55 \ - ${OPT_DIR}/neon/X25519-AArch64-simple_unfold_process${i}.s \ - -o ${OPT_DIR}/neon/X25519-AArch64-simple_unfold_process$((${i}+1)).s \ - -r x25519_scalarmult_alt_unfold_process${i},x25519_scalarmult_alt_unfold_process$((${i}+1)) \ - -c inputs_are_outputs -c outputs="[x0]" \ - -s mainloop -e end_label \ - -c variable_size \ - -c max_solutions=512 \ - -c timeout=240 \ - -c constraints.stalls_first_attempt=32 \ - -c split_heuristic \ - -c split_heuristic_region="[0.3,1]" \ - -c objective_precision=0.1 \ - -c constraints.move_stalls_to_top \ - -c split_heuristic_stepsize=0.05 \ - -c split_heuristic_factor=5 \ - -c split_heuristic_repeat=3 \ - -c split_heuristic_abort_cycle_at=8 \ - -c constraints.model_latencies=False \ - $REDIRECT_OUTPUT - -echo "*** Step 6" -i=4 ${SLOTHY_DIR}/slothy-cli Arm_AArch64 Arm_Cortex_A55 \ ${OPT_DIR}/neon/X25519-AArch64-simple_unfold_process${i}.s \ -o ${OPT_DIR}/neon/X25519-AArch64-simple_unfold_process$((${i}+1)).s \ @@ -155,61 +132,18 @@ i=4 -c split_heuristic_stepsize=0.05 \ -c split_heuristic_factor=5 \ -c split_heuristic_repeat=3 \ - -c split_heuristic_abort_cycle_at=5 \ + -c split_heuristic_abort_cycle_at=8 \ -c constraints.model_latencies=False \ $REDIRECT_OUTPUT # Finally, also consider latencies -echo "** Step 7-9: Consider latencies" -echo "*** Step 7" -i=5 - ${SLOTHY_DIR}/slothy-cli Arm_AArch64 Arm_Cortex_A55 \ - ${OPT_DIR}/neon/X25519-AArch64-simple_unfold_process${i}.s \ - -o ${OPT_DIR}/neon/X25519-AArch64-simple_unfold_process$((${i}+1)).s \ - -r x25519_scalarmult_alt_unfold_process${i},x25519_scalarmult_alt_unfold_process$((${i}+1)) \ - -c inputs_are_outputs -c outputs="[x0]" \ - -s mainloop -e end_label \ - -c variable_size \ - -c max_solutions=512 \ - -c timeout=300 \ - -c constraints.stalls_first_attempt=32 \ - -c split_heuristic \ - -c split_heuristic_region="[0,1]" \ - -c objective_precision=0.1 \ - -c split_heuristic_stepsize=0.05 \ - -c split_heuristic_optimize_seam=10 \ - -c split_heuristic_factor=8 \ - -c split_heuristic_repeat=10 \ - $REDIRECT_OUTPUT - -echo "*** Step 8" -i=6 - ${SLOTHY_DIR}/slothy-cli Arm_AArch64 Arm_Cortex_A55 \ - ${OPT_DIR}/neon/X25519-AArch64-simple_unfold_process${i}.s \ - -o ${OPT_DIR}/neon/X25519-AArch64-simple_unfold_process$((${i}+1)).s \ - -r x25519_scalarmult_alt_unfold_process${i},x25519_scalarmult_alt_unfold_process$((${i}+1)) \ - -c inputs_are_outputs -c outputs="[x0]" \ - -s mainloop -e end_label \ - -c variable_size \ - -c max_solutions=512 \ - -c timeout=300 \ - -c constraints.stalls_first_attempt=32 \ - -c split_heuristic \ - -c split_heuristic_region="[0,1]" \ - -c objective_precision=0.1 \ - -c split_heuristic_stepsize=0.05 \ - -c split_heuristic_optimize_seam=10 \ - -c split_heuristic_factor=8 \ - -c split_heuristic_repeat=3 \ - $REDIRECT_OUTPUT - -echo "*** Step 9" -i=7 +echo "** Step 6: Consider latencies" +i=4 ${SLOTHY_DIR}/slothy-cli Arm_AArch64 Arm_Cortex_A55 \ - ${OPT_DIR}/neon/X25519-AArch64-simple_unfold_process${i}.s \ + ${OPT_DIR}/neon/X25519-AArch64-simple_unfold_process${i}.s \ -o ${OPT_DIR}/neon/X25519-AArch64-simple_opt.s \ - -r x25519_scalarmult_alt_unfold_process${i},x25519_scalarmult_opt \ + -r x25519_scalarmult_alt_unfold_process${i},x25519_scalarmult_opt \ -c inputs_are_outputs -c outputs="[x0]" \ -s mainloop -e end_label \ -c variable_size \ @@ -217,13 +151,12 @@ i=7 -c timeout=300 \ -c constraints.stalls_first_attempt=32 \ -c split_heuristic \ - -c split_heuristic_region="[0,1]" \ -c objective_precision=0.1 \ -c split_heuristic_stepsize=0.05 \ -c split_heuristic_optimize_seam=10 \ -c split_heuristic_factor=8 \ - -c split_heuristic_repeat=3 \ + -c split_heuristic_repeat=8 \ -c constraints.move_stalls_to_top \ $REDIRECT_OUTPUT -cd "${0%/*}" + cd "${0%/*}"