Skip to content

Commit d7d566d

Browse files
author
Vasileios Karakasis
authored
Merge pull request #783 from ajocksch/checks/magma_revised
[test] Revise MAGMA library benchmark
2 parents 8b6a3b3 + 665fc7f commit d7d566d

File tree

2 files changed

+31
-39
lines changed

2 files changed

+31
-39
lines changed

cscs-checks/libraries/magma/magma_checks.py

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -40,80 +40,82 @@ def __init__(self, subtest):
4040
},
4141
}
4242
elif subtest == 'zgemm':
43+
self.executable_opts = ['--range 1088:3136:1024']
4344
self.perf_patterns = {
44-
'magma': sn.extractsingle(r'MAGMA GFlops: (?P<magma_gflops>\S+)',
45-
self.stdout, 'magma_gflops', float),
45+
'magma': sn.extractsingle(
46+
r'MAGMA GFlops: (?P<magma_gflops>\S+)',
47+
self.stdout, 'magma_gflops', float, 2
48+
),
4649
'cublas': sn.extractsingle(
4750
r'cuBLAS GFlops: (?P<cublas_gflops>\S+)', self.stdout,
48-
'cublas_gflops', float),
49-
'cpu': sn.extractsingle(r'CPU GFlops: (?P<cpu_gflops>\S+)',
50-
self.stdout, 'cpu_gflops', float)
51+
'cublas_gflops', float, 2)
5152
}
5253
self.reference = {
5354
'daint:gpu': {
54-
'magma': (3344, -0.05, None, 'Gflop/s'),
55-
'cublas': (3709, -0.05, None, 'Gflop/s'),
56-
'cpu': (42.8, -0.27, None, 'Gflop/s'),
55+
'magma': (3692.65, -0.05, None, 'Gflop/s'),
56+
'cublas': (4269.31, -0.09, None, 'Gflop/s'),
5757
},
5858
'dom:gpu': {
59-
'magma': (3344, -0.05, None, 'Gflop/s'),
60-
'cublas': (3709, -0.05, None, 'Gflop/s'),
61-
'cpu': (42.8, -0.27, None, 'Gflop/s'),
59+
'magma': (3692.65, -0.05, None, 'Gflop/s'),
60+
'cublas': (4269.31, -0.09, None, 'Gflop/s'),
61+
},
62+
'*': {
63+
'magma': (0, None, None, 'Gflop/s'),
64+
'cublas': (0, None, None, 'Gflop/s'),
6265
},
6366
}
6467
elif subtest == 'zsymmetrize':
6568
self.perf_patterns = {
66-
'cpu_perf': sn.extractsingle(r'CPU performance: (\S+)',
67-
self.stdout, 1, float),
6869
'gpu_perf': sn.extractsingle(r'GPU performance: (\S+)',
6970
self.stdout, 1, float),
7071
}
7172
self.reference = {
7273
'daint:gpu': {
73-
'cpu_perf': (0.91, -0.05, None, 'GB/s'),
7474
'gpu_perf': (158.3, -0.05, None, 'GB/s'),
7575
},
7676
'dom:gpu': {
77-
'cpu_perf': (0.91, -0.05, None, 'GB/s'),
7877
'gpu_perf': (158.3, -0.05, None, 'GB/s'),
7978
},
79+
'*': {
80+
'gpu_perf': (0, None, None, 'GB/s'),
81+
},
8082
}
8183
elif subtest == 'ztranspose':
8284
self.perf_patterns = {
83-
'cpu_perf':
84-
sn.extractsingle(r'CPU performance: (?P<cpu_performance>\S+)',
85-
self.stdout, 'cpu_performance', float),
8685
'gpu_perf':
87-
sn.extractsingle(r'GPU performance: (?P<gpu_performance>\S+)',
88-
self.stdout, 'gpu_performance', float)
86+
sn.extractsingle(
87+
r'GPU performance: (?P<gpu_performance>\S+)',
88+
self.stdout, 'gpu_performance', float
89+
)
8990
}
9091
self.reference = {
9192
'daint:gpu': {
92-
'cpu_perf': (1.51, -0.05, None, 'GB/s'),
9393
'gpu_perf': (498.2, -0.05, None, 'GB/s'),
9494
},
9595
'dom:gpu': {
96-
'cpu_perf': (1.51, -0.05, None, 'GB/s'),
9796
'gpu_perf': (498.2, -0.05, None, 'GB/s'),
9897
},
98+
'*': {
99+
'gpu_perf': (0, None, None, 'GB/s'),
100+
},
99101
}
100102
elif subtest == 'zunmbr':
101103
# This test fails to compile with Magma 2.4
102104
self.perf_patterns = {
103-
'cpu_perf':
104-
sn.extractsingle(r'CPU performance: (?P<cpu_performance>\S+)',
105-
self.stdout, 'cpu_performance', float),
106105
'gpu_perf':
107-
sn.extractsingle(r'GPU performance: (?P<gpu_performance>\S+)',
108-
self.stdout, 'gpu_performance', float)
106+
sn.extractsingle(
107+
r'GPU performance: (?P<gpu_performance>\S+)',
108+
self.stdout, 'gpu_performance', float
109+
)
109110
}
110111
self.reference = {
111112
'daint:gpu': {
112-
'cpu_perf': (36.6, -0.05, None, 'Gflop/s'),
113113
'gpu_perf': (254.7, -0.05, None, 'Gflop/s'),
114114
},
115115
'dom:gpu': {
116-
'cpu_perf': (36.6, -0.05, None, 'Gflop/s'),
117116
'gpu_perf': (254.7, -0.05, None, 'Gflop/s'),
118117
},
118+
'*': {
119+
'gpu_perf': (0, None, None, 'Gflop/s'),
120+
},
119121
}

cscs-checks/libraries/magma/src/patch.txt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,6 @@ diff -Naur src/testing_zgemm.cpp src_patched/testing_zgemm.cpp
6767

6868
// Allow 3*eps; complex needs 2*sqrt(2) factor; see Higham, 2002, sec. 3.6.
6969
double eps = lapackf77_dlamch("E");
70-
@@ -87,7 +88,8 @@
71-
g_platform_str, g_platform_str );
72-
#endif
73-
printf("%%========================================================================================================\n");
74-
- for( int itest = 0; itest < opts.ntest; ++itest ) {
75-
+//ajajajaj for( int itest = 0; itest < opts.ntest; ++itest ) {
76-
+ for( int itest = 0; itest < opts.ntest; itest+=100 ) {
77-
for( int iter = 0; iter < opts.niter; ++iter ) {
78-
M = opts.msize[itest];
79-
N = opts.nsize[itest];
8070
@@ -220,6 +222,9 @@
8171
cpu_perf, 1000.*cpu_time,
8272
magma_error, dev_error,

0 commit comments

Comments
 (0)