#!/bin/sh
EXE="$(find . -name tile_rmsnorm2d_fwd -type f | head -n 1)"

for fquant in "" "-fquant=1 -prec_o=int8" "-fquant=2 -prec_o=int8" "-fquant=1 -prec_o=fp8" "-fquant=2 -prec_o=fp8"\
  "-fquant=1 -prec_o=int8 -save_unquant=1" "-fquant=2 -prec_o=int8 -save_unquant=1" "-fquant=1 -prec_o=fp8 -save_unquant=1" "-fquant=2 -prec_o=fp8 -save_unquant=1"; do
for pr_i in "fp16" "bf16" ; do
for fadd in "0" "1"; do
# 0: for no specific RMSNorm; 1: for T-5 like RMSNorm
for s in "0" "1"; do
$EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=99  -n=13
$EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=17  -n=16
$EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=1   -n=100
$EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=4   -n=128
$EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=80  -n=127
# $EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=22  -n=255 -stride=256
$EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=7   -n=599
$EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=19  -n=512
# $EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=33  -n=313 -stride=1000
$EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=11  -n=510
# $EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=171 -n=676 -stride=818
$EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=91  -n=636
# $EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=12  -n=768 -stride=800
# $EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=100 -n=766 -stride=812
$EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=31  -n=1024
# $EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=64  -n=1000 -stride=1004
$EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=8   -n=1501
$EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=3   -n=1826
$EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=5   -n=2040
$EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=7   -n=2734
$EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=1   -n=3182
$EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=9   -n=4096
$EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=3   -n=8192
done
done
done
done

# The following cases uses two pass pipeline which doesn't support quant epilogue. 
for fquant in ""
for pr_i in "fp16" "bf16" ; do
for fadd in "0" "1"; do
# 0: for no specific RMSNorm; 1: for T-5 like RMSNorm
for s in "0" "1"; do
$EXE -prec_i=$pr_i -fadd=$fadd -s=$s $fquant -m=1   -n=10547
#$EXE -prec_i=$pr_i -fadd=$fadd $fquant -m=3   -n=17134
done
done
done
done
