Skip to content

Commit 106680a

Browse files
committed
Update GPU benchmark script for blk kernels
1 parent e646d93 commit 106680a

File tree

1 file changed

+30
-7
lines changed

1 file changed

+30
-7
lines changed

benchmark_gpu.sh

+30-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22

33
gpu=V100
4+
type=blk3d
5+
46
iter=5
57
size=1024
68
indexes=$(($size * 256 * 1024))
@@ -28,13 +30,25 @@ then
2830
fi
2931
if [[ "$1" == "--pad" ]] || [[ "$2" == "--pad" ]] || [[ "$3" == "--pad" ]]
3032
then
31-
pad_end=32
32-
pad_array=(0 1 2 4 8 16 32)
33+
if [[ "$type" == "blk3d" ]]
34+
then
35+
pad_end=8
36+
pad_array=(0 1 2 4 8)
37+
else
38+
pad_end=32
39+
pad_array=(0 1 2 4 8 16 32)
40+
fi
3341
fi
3442
if [[ "$1" == "--halo" ]] || [[ "$2" == "--halo" ]] || [[ "$3" == "--halo" ]]
3543
then
36-
halo_end=32
37-
halo_array=(0 1 2 4 8 16 32)
44+
if [[ "$type" == "blk3d" ]]
45+
then
46+
halo_end=8
47+
halo_array=(0 1 2 4 8)
48+
else
49+
halo_end=32
50+
halo_array=(0 1 2 4 8 16 32)
51+
fi
3852
fi
3953

4054
echo "Type" | xargs printf "%-9s"
@@ -50,16 +64,25 @@ then
5064
fi
5165
echo
5266

53-
type=std
5467
ndr=1
5568
VEC=1
5669
if [[ $gpu == "V100" ]]
5770
then
58-
BSIZE=512
71+
if [[ "$type" == "blk3d" ]]
72+
then
73+
BSIZE=32
74+
else
75+
BSIZE=512
76+
fi
5977
gpu_id=1
6078
max_bw=897.0
6179
else
62-
BSIZE=128
80+
if [[ "$type" == "blk3d" ]]
81+
then
82+
BSIZE=32
83+
else
84+
BSIZE=128
85+
fi
6386
gpu_id=2
6487
max_bw=249.6
6588
fi

0 commit comments

Comments
 (0)