-
Notifications
You must be signed in to change notification settings - Fork 2
/
test_script.sh
67 lines (60 loc) · 2.3 KB
/
test_script.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
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
declare BIT=$1
declare LOOPS=$2
declare SCIPY=1
declare NUMBA=4
declare CUPY=6
# Test Scipy
for (( n=1; n<=${SCIPY}; n++ ))
do
echo -e "**************************************************"
echo -e "Test gtc_fall_scipy_v${n}.py ${BIT} ${LOOPS}"
echo -e "**************************************************"
nsys profile --sample=none --trace=cuda,nvtx --stats=true python3 gtc_fall_scipy_v${n}.py ${BIT} ${LOOPS}
echo -e
done
# Test Numba
for (( n=1; n<=${NUMBA}; n++ ))
do
echo -e "**************************************************"
echo -e "Test gtc_fall_numpy_v${n}.py ${BIT} ${LOOPS}"
echo -e "**************************************************"
nsys profile --sample=none --trace=cuda,nvtx --stats=true python3 gtc_fall_numba_v${n}.py ${BIT} ${LOOPS}
echo -e
done
# Build fatbins for CuPy testing
nvcc --fatbin -std=c++11 --use_fast_math \
--generate-code arch=compute_35,code=sm_35 \
--generate-code arch=compute_35,code=sm_37 \
--generate-code arch=compute_50,code=sm_50 \
--generate-code arch=compute_50,code=sm_52 \
--generate-code arch=compute_53,code=sm_53 \
--generate-code arch=compute_60,code=sm_60 \
--generate-code arch=compute_61,code=sm_61 \
--generate-code arch=compute_62,code=sm_62 \
--generate-code arch=compute_70,code=sm_70 \
--generate-code arch=compute_72,code=sm_72 \
--generate-code arch=compute_75,code=[sm_75,compute_75] \
_lombscargle.cu -odir .
nvcc --fatbin -std=c++11 --use_fast_math \
--generate-code arch=compute_35,code=sm_35 \
--generate-code arch=compute_35,code=sm_37 \
--generate-code arch=compute_50,code=sm_50 \
--generate-code arch=compute_50,code=sm_52 \
--generate-code arch=compute_53,code=sm_53 \
--generate-code arch=compute_60,code=sm_60 \
--generate-code arch=compute_61,code=sm_61 \
--generate-code arch=compute_62,code=sm_62 \
--generate-code arch=compute_70,code=sm_70 \
--generate-code arch=compute_72,code=sm_72 \
--generate-code arch=compute_75,code=[sm_75,compute_75] \
_lombscargle_lb.cu -odir .
# Test CuPy
for (( n=1; n<=${CUPY}; n++ ))
do
echo -e "**************************************************"
echo -e "Test gtc_fall_cupy_v${n}.py ${BIT} ${LOOPS}"
echo -e "**************************************************"
nsys profile --sample=none --trace=cuda,nvtx --stats=true python3 gtc_fall_cupy_v${n}.py ${BIT} ${LOOPS}
echo -e
done