-
Notifications
You must be signed in to change notification settings - Fork 1
/
ukr-generator.sh
executable file
·57 lines (43 loc) · 1.37 KB
/
ukr-generator.sh
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
source src/bash/arch.sh
source SIMD_generator.config
CONFIG_PATH=SIMD-arch
#-Set pipelining option for ukernel generator
_PIPELINING=""
if [ "$PIPELINING" = "T" ]; then
_PIPELINING="--pipelining"
UNROLL=0
fi
#-Set reorder loads option for ukernel generator
_REORDER=""
if [ "$REORDER" = "T" ]; then
_REORDER="--reorder"
fi
#-Set reorder loads option for ukernel generator
_UNROLL=""
if [ $UNROLL -ne 0 ]; then
_UNROLL="--unroll ${UNROLL}"
fi
#-Set reorder loads option for ukernel generator
_OP=""
if [ "$OP" != "NORMAL" ]; then
_OP="--op_b ${OP,,}"
fi
if [ "$DATA" != "FP32" ]; then
echo "ERROR: Actually, only is supported Float 32 bits data type."
exit -1
fi
if [ ! -f $CONFIG_PATH/$ARCH_CONFIG ]; then
echo "ERROR: The Architecture configure doesn't exist. Please, enter a valid filename."
exit -1
fi
VLEN=$(tail -1 $CONFIG_PATH/$ARCH_CONFIG | cut -f1)
MAXVECTOR=$(tail -1 $CONFIG_PATH/$ARCH_CONFIG | cut -f2)
rm src/asm_generator/ukernels/*
if [ "$ARCH" = "$RISCV" ]; then
./src/asm_generator/ukernels_generator.py --arch riscv --data ${DATA} --vlen ${VLEN} \
--maxvec ${MAXVECTOR} ${_OP} ${_REORDER} ${_PIPELINING} ${_UNROLL}
else
./src/asm_generator/ukernels_generator.py --arch armv8 --data ${DATA} --vlen ${VLEN} \
--maxvec ${MAXVECTOR} ${_PIPELINING} ${_UNROLL}
fi