Skip to content

Commit

Permalink
Create configuration file for run script
Browse files Browse the repository at this point in the history
  • Loading branch information
compor committed Nov 1, 2023
1 parent 211c806 commit 43fbcf6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
6 changes: 6 additions & 0 deletions scripts/all.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
saxpy/64xf32/
ssum/8x16xf32/
ssum/14x26xf32/
dsum/8x16xf32/
matmul/8x8xf64/
matmul/16x16xf64/
2 changes: 2 additions & 0 deletions scripts/run.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dsum/8x16xf32/
matmul/8x8xf64/
27 changes: 15 additions & 12 deletions scripts/run.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
#!/usr/bin/env bash

VALID_ARGS=$(getopt -o h --long tag:,abort-on-error,skip-clean,skip-build,skip-run,skip-results,help -- "$@")
VALID_ARGS=$(getopt -o h --long config:,tag:,abort-on-error,skip-clean,skip-build,skip-run,skip-results,help -- "$@")
if [[ $? -ne 0 ]]; then
exit 1;
fi

THIS_DIR=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)

TAG=$(date +"%FT%H%M%S")
CONFIG_FILE="${THIS_DIR}/run.cfg"
ABORT_ON_ERROR=0
SKIP_CLEAN=0
SKIP_BUILD=0
Expand All @@ -15,6 +18,16 @@ SKIP_RESULTS=0
eval set -- "$VALID_ARGS"
while [ : ]; do
case "$1" in
--config)
case "$2" in
'')
;;
*)
CONFIG_FILE=$2
;;
esac
shift 2
;;
--tag)
case "$2" in
'')
Expand Down Expand Up @@ -68,8 +81,6 @@ done
# detect if we are within Docker instance
[ -f /.dockerenv ] && export PATH=/opt/python3.11/bin/:$PATH

THIS_DIR=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)

XDSL_DIR=${THIS_DIR}/../xdsl/
SCRIPTS_DIR=${THIS_DIR}/../scripts/
PLOTTING_DIR=${THIS_DIR}/../scripts/plotting/
Expand All @@ -79,15 +90,7 @@ RESULTS_DIR=${THIS_DIR}/../results/

VENV_DIR=".venv"

KERNEL_DIRS=(
# "saxpy/64xf32/"
# "ssum/8x16xf32/"
# "ssum/14x26xf32/"
"dsum/8x16xf32/"
"matmul/8x8xf64/"
#"matmul/16x16xf64/"
"relu/16x16xf64/"
)
mapfile -t KERNEL_DIRS < ${CONFIG_FILE}

if [[ 1 -eq ${ABORT_ON_ERROR} ]]; then
set -e
Expand Down

0 comments on commit 43fbcf6

Please sign in to comment.