This commit is contained in:
Everton Constantino 2021-05-13 14:48:40 +00:00
parent 9b8cdceea8
commit bfadb56107
2 changed files with 10 additions and 9 deletions

View File

@ -2,4 +2,5 @@
#echo 'Compiling with master' #echo 'Compiling with master'
#g++ -O3 -I../eigen-master -std=c++11 new_gemm_test.cpp -o gto #g++ -O3 -I../eigen-master -std=c++11 new_gemm_test.cpp -o gto
echo 'Compiling current' echo 'Compiling current'
g++ -O3 -I. -std=c++14 new_gemm_test.cpp -D__ENABLE_VECTOR_KERNELS__ -D__ENABLE_PREFETCH__ -o gt g++ -O3 -I. -std=c++14 new_gemm_test.cpp -D__ENABLE_VECTOR_KERNELS__ -D__ENABLE_PREFETCH__ -o gtp
g++ -O3 -I. -std=c++14 new_gemm_test.cpp -D__ENABLE_VECTOR_KERNELS__ -o gt

16
run.sh
View File

@ -2,6 +2,7 @@
function run() { function run() {
OLD=0 OLD=0
NEW=0 NEW=0
NEWP=0
EXECS=$1 EXECS=$1
SIZE=$2 SIZE=$2
RUNS=$3 RUNS=$3
@ -9,25 +10,24 @@ function run() {
SEL=$(A=$(shuf -i 0-10 -n 1); echo $(($A % 2))) SEL=$(A=$(shuf -i 0-10 -n 1); echo $(($A % 2)))
if [ $SEL -eq 0 ]; then if [ $SEL -eq 0 ]; then
T_OLD=$(./gto $SIZE $RUNS) T_OLD=$(./gto $SIZE $RUNS)
#echo "Master: $T_OLD"
OLD=$OLD+$T_OLD
T_NEW=$(./gt $SIZE $RUNS) T_NEW=$(./gt $SIZE $RUNS)
#echo "Current: $T_NEW" T_NEWP=$(./gtp $SIZE $RUNS)
else else
T_NEW=$(./gt $SIZE $RUNS) T_NEW=$(./gt $SIZE $RUNS)
#echo "Current: $T_NEW" T_NEWP=$(./gtp $SIZE $RUNS)
T_OLD=$(./gto $SIZE $RUNS) T_OLD=$(./gto $SIZE $RUNS)
#echo "Master: $T_OLD"
OLD=$OLD+$T_OLD
fi fi
NEW=$NEW+$T_NEW NEW=$NEW+$T_NEW
OLD=$OLD+$T_OLD
NEWP=$NEWP+$T_NEWP
done done
SPEED=$(echo "($OLD) / ($NEW)" | bc -l) SPEED=$(echo "($OLD) / ($NEW)" | bc -l)
echo "$SIZE -> $SPEED" SPEEDP=$(echo "($OLD) / ($NEWP)" | bc -l)
echo "$SIZE -> $SPEED $SPEEDP"
} }
run $1 16 500 run $1 16 500
run $1 32 500 run $1 32 500
run $1 64 500 run $1 64 500
run $1 128 100 run $1 128 100
run $1 256 100 run $1 256 50