-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_GPU_SpMM_ASpT.sh
executable file
·60 lines (51 loc) · 1.61 KB
/
run_GPU_SpMM_ASpT.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
#!/bin/bash
mkdir GPU_SpMM_result
cd data
rm SpMM_GPU_SP.out
rm SpMM_GPU_DP.out
rm SpMM_GPU_SP_preprocessing.out
rm SpMM_GPU_DP_preprocessing.out
echo "dataset, ASpT_GFLOPs(K=32), ASpT_diff_%(K=32), ASpT_GFLOPs(K=128), ASpT_diff_%(K=128)" >> SpMM_GPU_SP.out
echo "dataset, preprocessing_ratio" >> SpMM_GPU_SP_preprocessing.out
for i in `ls -d */`
do
cd ${i}
ii=${i/\//}
cd ..
echo -n ${ii} >> SpMM_GPU_SP.out
echo -n "," >> SpMM_GPU_SP.out
echo -n ${ii} >> SpMM_GPU_SP_preprocessing.out
echo -n "," >> SpMM_GPU_SP_preprocessing.out
#../cuSPARSE_SpMM/cuSPARSE_SP ${ii}/${ii}.mtx
../ASpT_SpMM_GPU/sspmm_32 ${ii}/${ii}.mtx 32
../ASpT_SpMM_GPU/sspmm_128 ${ii}/${ii}.mtx 128
#../merge-spmm/bin/gbspmm --tb=128 --nt=32 --max_ncols=32 --iter=1 ${ii}/${ii}.mtx
#../merge-spmm/bin/gbspmm --tb=128 --nt=32 --max_ncols=128 --iter=1 ${ii}/${ii}.mtx
echo >> SpMM_GPU_SP.out
echo >> SpMM_GPU_SP_preprocessing.out
done
echo "dataset, ASpT_GFLOPs(K=32), ASpT_diff_%(K=32), ASpT_GFLOPs(K=128), ASpT_diff_%(K=128)" >> SpMM_GPU_DP.out
echo "dataset, preprocessing_ratio" >> SpMM_GPU_DP_preprocessing.out
for i in `ls -d */`
do
cd ${i}
ii=${i/\//}
cd ..
echo -n ${ii} >> SpMM_GPU_DP.out
echo -n "," >> SpMM_GPU_DP.out
echo -n ${ii} >> SpMM_GPU_DP_preprocessing.out
echo -n "," >> SpMM_GPU_DP_preprocessing.out
#../cuSPARSE_SpMM/cuSPARSE_DP ${ii}/${ii}.mtx
../ASpT_SpMM_GPU/dspmm_32 ${ii}/${ii}.mtx 32
../ASpT_SpMM_GPU/dspmm_128 ${ii}/${ii}.mtx 128
echo >> SpMM_GPU_DP.out
echo >> SpMM_GPU_DP_preprocessing.out
done
rm gmon.out
mv *.out ../GPU_SpMM_result
cd ..
#for i in `ls -d *.mtx`
#do
#../ASpT_SpMM/sddmm_32 ${i} 32
#../ASpT_SpMM/sddmm_128 ${i} 128
#done