README.md 2.31 KB
Newer Older
Sweety Wadhwa's avatar
Sweety Wadhwa committed
1
2
**CUDA DGEMV for Block Diagonal matrices**

Sweety Wadhwa's avatar
Sweety Wadhwa committed
3
•	computes Ax=y
Sweety Wadhwa's avatar
Sweety Wadhwa committed
4

Sweety Wadhwa's avatar
Sweety Wadhwa committed
5
•	dgemv_without_pointer.cu
Sweety Wadhwa's avatar
Sweety Wadhwa committed
6

Sweety Wadhwa's avatar
Sweety Wadhwa committed
7
•	dgemv_with_pointer(calling __device).cu
Sweety Wadhwa's avatar
Sweety Wadhwa committed
8
9
10

**Compiling**

Sweety Wadhwa's avatar
Sweety Wadhwa committed
11
export CUDA_PATH=....
Sweety Wadhwa's avatar
Sweety Wadhwa committed
12

Sweety Wadhwa's avatar
Sweety Wadhwa committed
13
nvcc dgemv_without_pointer.cu –o dgemv_without_pointer
Sweety Wadhwa's avatar
Sweety Wadhwa committed
14

Sweety Wadhwa's avatar
Sweety Wadhwa committed
15
or
Sweety Wadhwa's avatar
Sweety Wadhwa committed
16

Sweety Wadhwa's avatar
Sweety Wadhwa committed
17
make
Sweety Wadhwa's avatar
Sweety Wadhwa committed
18
19
20

**Executing**

Sweety Wadhwa's avatar
Sweety Wadhwa committed
21
./dgemv_without_pointer
Sweety Wadhwa's avatar
Sweety Wadhwa committed
22
23
24

**Tests on Anselm**

Sweety Wadhwa's avatar
Sweety Wadhwa committed
25
•	node cn199
Sweety Wadhwa's avatar
Sweety Wadhwa committed
26

Sweety Wadhwa's avatar
Sweety Wadhwa committed
27
•	Nvidia Tesla K20m -- 13 SM, 192 threads per SM
Sweety Wadhwa's avatar
Sweety Wadhwa committed
28

Sweety Wadhwa's avatar
Sweety Wadhwa committed
29
•	square blocks
Sweety Wadhwa's avatar
Sweety Wadhwa committed
30

Sweety Wadhwa's avatar
Sweety Wadhwa committed
31
•	Bandwidth averaged over 100 runs
Sweety Wadhwa's avatar
Sweety Wadhwa committed
32

Sweety Wadhwa's avatar
Sweety Wadhwa committed
33
34
35
•	Assumed peak bandwidth 149 GB/s


Sweety Wadhwa's avatar
Sweety Wadhwa committed
36
37
**130 Blocks**

Sweety Wadhwa's avatar
Sweety Wadhwa committed
38
39
40
41
42
43
44
45
46
47
| Rows | Threads | Bandwidth GB/s(without pointer) | Bandwidth GB/s(with pointer) |
| :---         |     :---:      |          ---: |          ---: |
| 32  | 32     | 20.53    | 8.99    |
| 64     | 64       | 43.36      | 13.07      |
| 128  | 128     | 76.13    | 15.25    |
| 192     | 192       | 97.57      | 15.65      |
| 256  | 256     | 98.67    | 14.70    |
| 384     | 384       | 117.44      | 15.27      |


Sweety Wadhwa's avatar
Sweety Wadhwa committed
48
**1300 Blocks** 
Sweety Wadhwa's avatar
Sweety Wadhwa committed
49
50
51
52
53
54
55
56
57
58
59

| Rows | Threads | Bandwidth GB/s(without pointer) | Bandwidth GB/s(with pointer) |
| :---         |     :---:      |          ---: |          ---: |
| 32  | 32     | 36.30    | 12.8    |
| 64     | 64       | 68.36      | 14.76      |
| 128  | 128     | 94.60    | 15.52    |
| 192     | 192       | 108.69      | 15.82      |
| 256  | 256     | 118.31    | 15.97    |
| 384     | 384       | 128.11      | 15.81      |


Sweety Wadhwa's avatar
Sweety Wadhwa committed
60
**6500 Blocks**
Sweety Wadhwa's avatar
Sweety Wadhwa committed
61
62
63
64
65
66
67
68
69
70
71
72

| Rows | Threads | Bandwidth GB/s(without pointer) | Bandwidth GB/s(with pointer) |
| :---         |     :---:      |          ---: |          ---: |
| 32  | 32     | 43.50    | 14.24    |
| 64     | 64       | 83.27      | 15.72      |
| 128  | 128     | 107.46    | 16.15    |
| 192     | 192       | 119.64      | 16.30      |
| 256  | 256     | 124.96    | 16.37    |
| 384     | 384       | 132.17      | 16.18      |



Sweety Wadhwa's avatar
Sweety Wadhwa committed
73
**26 Blocks**
Sweety Wadhwa's avatar
Sweety Wadhwa committed
74
75
76
77
78
79
80
81
82
83
84
85

| Rows | Threads | Bandwidth GB/s(without pointer) | Bandwidth GB/s(with pointer) |
| :---         |     :---:      |          ---: |          ---: |
| 32  | 32     | 4.66    | 2.88    |
| 64     | 64       | 14.58      | 7.16      |
| 128  | 128     | 36.36    | 12.97    |
| 192     | 192       | 59.05      | 14.79      |
| 256  | 256     | 77.05    | 15.37    |
| 384     | 384       | 106.77      | 15.09      |
| 768     | 768       | 130.65      | 14.79      |
| 1536  | 768    | 139.01    | 12.53    |
| 2304     | 768       | 142.91      | 13.43      |