-
Notifications
You must be signed in to change notification settings - Fork 0
/
plutune
executable file
·39 lines (30 loc) · 973 Bytes
/
plutune
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
CC=icc
CFLAGS=-fast -DTIME
# CFLAGS=-O3 -DTIME
base=`dirname $1`/`basename $1 .c`
fusionoptions="--maxfuse --smartfuse --nofuse"
unrolloptions="--nounroll --unroll --unroll"
prevectoropts="--noprevector --prevector"
tileopts="--tile --notile"
#tileopts="--notile"
echo > tune_log
for fusionopt in $fusionoptions ; do
for tileopt in $tileopts ; do
i=0
for unrollopt in $unrolloptions; do
for vecopt in $prevectoropts ; do
../../polycc $base.c $fusionopt $unrollopt --ufactor=$i $vecopt $tileopt
echo $fusionopt $tileopt $unrollopt --ufactor=$i $vecopt | tee -a tune_log
if [ $tileopt = "--tile" ]; then
$(CC) $(CFLAGS) $base.tiled.c -o out
else
$(CC) $(CFLAGS) $base.opt.c -o out
fi
./out | tee -a tune_log
done
i=$((i+4))
done
done
done
rm -f out