Skip to content

Commit

Permalink
Experiment: Simplify x25519 optimization script
Browse files Browse the repository at this point in the history
  • Loading branch information
hanno-becker committed Dec 23, 2023
1 parent 10d22be commit f5baf3c
Showing 1 changed file with 7 additions and 74 deletions.
81 changes: 7 additions & 74 deletions paper/scripts/slothy_x25519.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -155,75 +132,31 @@ 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 \
-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 \
-c split_heuristic_repeat=8 \
-c constraints.move_stalls_to_top \
$REDIRECT_OUTPUT

cd "${0%/*}"
cd "${0%/*}"

0 comments on commit f5baf3c

Please sign in to comment.