Skip to content

Commit

Permalink
clean up tiling flow
Browse files Browse the repository at this point in the history
  • Loading branch information
Akhilesh Varadan Balasingam committed Jan 22, 2024
1 parent 016c075 commit 7f2ae26
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions scripts/formatting/generate_tensor_tile_formats_onyx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#SBATCH -N 1
#SBATCH -t 360

# ./scripts/generate_frostt_formats_onyx.sh <tensor_name.txt>
# edit tensor_name.txt with tensors to tile
# ./scripts/generate_frostt_formats_onyx.sh <tensor_name.txt> <yaml_file> <benchmark> <other_format> <docker name>

shopt -s extglob

Expand All @@ -15,22 +16,17 @@ BENCHMARKS=(
# tensor3_elemadd
# tensor3_innerprod
# tensor3_mttkrp
tensor3_ttm
# tensor3_ttm
$3
# tensor3_ttm
# tensor3_mttkrp
# tensor3_elemmul
# tensor3_mttkrp
)

OTHER_FORMATS=(
# sss
# sss
# s
ss
# ss
# sss
# ss
)
$4
)

OTHERBENCHES='["tensor3_ttv", "tensor3_ttm", "tensor3_mttkrp"]'

Expand All @@ -55,6 +51,7 @@ run_format(){
bench_path=$4
tile_path=$5
tensor_format=$6
other_form=$7

basedir=$(pwd)
echo "Processing $f"
Expand All @@ -74,12 +71,17 @@ run_format(){
echo "TENSOR_FORMAT: $TENSOR_FORMAT"
echo "format: $format"

# if tensor_format == "ss":
$basedir/compiler/taco/build/bin/taco-test sam.pack_$format

# else:
# $basedir/compiler/taco/build/bin/taco-test sam.pack_
echo "Name: $name"
echo "Format: $format"
echo "Bench: $bench"
echo "Bench path: $bench_path"
echo "tile_path: $tile_path"
echo "tensor_format: $tensor_format"
echo "other_form: $other_form"

python3 $basedir/scripts/formatting/datastructure_tns.py -n $name -f $format --other -b $bench -hw --output_dir $bench_path/formatted/$name

Expand Down Expand Up @@ -117,5 +119,8 @@ for i in ${!FORMATS[@]}; do

set_temp_env $old_frostt_formatted_taco_path $old_frostt_path $old_frostt_tensor_path $old_frostt_formatted_path
chmod -R 775 $FROSTT_FORMATTED_PATH

done
done
done

docker cp tiles $5:/aha/garnet/tiles_$3

0 comments on commit 7f2ae26

Please sign in to comment.