1% MATLAB dnn_gb.m 2 3% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. 4% SPDX-License-Identifier: GPL-3.0-or-later 5 6% threads: 1 time: 23.53 sec speedup: 1.00 rate: 10.03 billion 7% threads: 1 time: 67.52 sec speedup: 1.00 rate: 13.98 billion 8% threads: 1 time: 242.19 sec speedup: 1.00 rate: 15.59 billion 9% threads: 1 time: 97.65 sec speedup: 1.00 rate: 9.66 billion 10% threads: 1 time: 292.59 sec speedup: 1.00 rate: 12.90 billion 11% threads: 1 time: 1075.60 sec speedup: 1.00 rate: 14.04 billion 12% threads: 1 time: 766.19 sec speedup: 1.00 rate: 4.93 billion 13% threads: 1 time: 2683.75 sec speedup: 1.00 rate: 5.63 billion 14% threads: 1 time: 10381.39 sec speedup: 1.00 rate: 5.82 billion 15% threads: 1 time: 3777.13 sec speedup: 1.00 rate: 4.00 billion 16% threads: 1 time: 13816.56 sec speedup: 1.00 rate: 4.37 billion 17% threads: 1 time: 54701.46 sec speedup: 1.00 rate: 4.42 billion 18 19TM1 = [ 20 23.53 21 67.52 22 242.19 23 97.65 24 292.59 25 1075.60 26 766.19 27 2683.75 28 10381.39 29 3777.13 30 13816.56 31 54701.46 ] ; 32 33% threads: 40 time: 2.75 sec speedup: 8.54 rate: 85.64 billion 34% threads: 40 time: 9.32 sec speedup: 7.25 rate: 101.27 billion 35% threads: 40 time: 34.29 sec speedup: 7.06 rate: 110.08 billion 36% threads: 40 time: 9.98 sec speedup: 9.78 rate: 94.54 billion 37% threads: 40 time: 30.62 sec speedup: 9.56 rate: 123.28 billion 38% threads: 40 time: 116.95 sec speedup: 9.20 rate: 129.11 billion 39% threads: 40 time: 58.44 sec speedup: 13.11 rate: 64.60 billion 40% threads: 40 time: 200.74 sec speedup: 13.37 rate: 75.22 billion 41% threads: 40 time: 782.76 sec speedup: 13.26 rate: 77.16 billion 42% threads: 40 time: 254.38 sec speedup: 14.85 rate: 59.36 billion 43% threads: 40 time: 970.67 sec speedup: 14.23 rate: 62.22 billion 44% threads: 40 time: 3829.45 sec speedup: 14.28 rate: 63.09 billion 45 46TM40 = [ 47 2.75 48 9.32 49 34.29 50 9.98 51 30.62 52 116.95 53 58.44 54 200.74 55 782.76 56 254.38 57 970.67 58 3829.45 ] ; 59 60% % LAGRAPH, pure C 61% nthreads 1: soln time 24.20 sec rate 9.7483 (1e9 edges/sec) 62% nthreads 1: soln time 68.24 sec rate 13.8302 (1e9 edges/sec) 63% nthreads 1: soln time 243.30 sec rate 15.5156 (1e9 edges/sec) 64% nthreads 1: soln time 108.10 sec rate 8.7299 (1e9 edges/sec) 65% nthreads 1: soln time 330.14 sec rate 11.4343 (1e9 edges/sec) 66% nthreads 1: soln time 1222.49 sec rate 12.3514 (1e9 edges/sec) 67% nthreads 1: soln time 741.36 sec rate 5.0918 (1e9 edges/sec) 68% nthreads 1: soln time 2552.07 sec rate 5.9166 (1e9 edges/sec) 69% nthreads 1: soln time 9783.12 sec rate 6.1737 (1e9 edges/sec) 70% nthreads 1: soln time 4536.25 sec rate 3.3286 (1e9 edges/sec) 71% nthreads 1: soln time 16446.86 sec rate 3.6723 (1e9 edges/sec) 72% nthreads 1: soln time 65492.28 sec rate 3.6889 (1e9 edges/sec) 73 74TL1 = [ 75 24.20 76 68.24 77 243.30 78 108.10 79 330.14 80 1222.49 81 741.36 82 2552.07 83 9783.12 84 4536.25 8516446.86 8665492.28 ] ; 87 88% nthreads 40: soln time 2.35 sec speedup 10.30 rate 100.3991 (1e9 edges/sec) 89% nthreads 40: soln time 4.51 sec speedup 15.12 rate 209.0649 (1e9 edges/sec) 90% nthreads 40: soln time 16.40 sec speedup 14.84 rate 230.1753 (1e9 edges/sec) 91% nthreads 40: soln time 9.33 sec speedup 11.59 rate 101.1921 (1e9 edges/sec) 92% nthreads 40: soln time 30.72 sec speedup 10.75 rate 122.8900 (1e9 edges/sec) 93% nthreads 40: soln time 117.64 sec speedup 10.39 rate 128.3516 (1e9 edges/sec) 94% nthreads 40: soln time 51.01 sec speedup 14.53 rate 74.0045 (1e9 edges/sec) 95% nthreads 40: soln time 174.99 sec speedup 14.58 rate 86.2887 (1e9 edges/sec) 96% nthreads 40: soln time 690.10 sec speedup 14.18 rate 87.5206 (1e9 edges/sec) 97% nthreads 40: soln time 245.33 sec speedup 18.49 rate 61.5469 (1e9 edges/sec) 98% nthreads 40: soln time 926.40 sec speedup 17.75 rate 65.1962 (1e9 edges/sec) 99% nthreads 40: soln time 3743.31 sec speedup 17.50 rate 64.5397 (1e9 edges/sec) 100 101TL40 = [ 102 2.35 103 4.51 104 16.40 105 9.33 106 30.72 107 117.64 108 51.01 109 174.99 110 690.10 111 245.33 112 926.40 1133743.31 ] ; 114 115% DNN sizes: 116% # edges in all layers: 3.93216 million 117% # edges in all layers: 15.7286 million 118% # edges in all layers: 62.9146 million 119% # edges in all layers: 15.7286 million 120% # edges in all layers: 62.9146 million 121% # edges in all layers: 251.658 million 122% # edges in all layers: 62.9146 million 123% # edges in all layers: 251.658 million 124% # edges in all layers: 1006.63 million 125% # edges in all layers: 251.658 million 126% # edges in all layers: 1006.63 million 127% # edges in all layers: 4026.53 million 128 129DNN_edges = [ 130 3.93216 * 1e6 131 15.7286 * 1e6 132 62.9146 * 1e6 133 15.7286 * 1e6 134 62.9146 * 1e6 135 251.658 * 1e6 136 62.9146 * 1e6 137 251.658 * 1e6 138 1006.63 * 1e6 139 251.658 * 1e6 140 1006.63 * 1e6 141 4026.53 * 1e6 ] ; 142 143nfeatures = 60000 ; 144 145fprintf ('%% Run time [1 thread: MATLAB LAGraph M/L] [40 threads: MATLAB LAGraph M/L]\n') ; 146for prob = 1:12 147 148 if (TM1 (prob) < TL1 (prob)) 149 fprintf ('{\\bf %8.0f }& %8.0f & %8.2f ', ... 150 TM1 (prob), TL1 (prob), TM1 (prob) / TL1 (prob)) ; 151 else 152 fprintf (' %8.0f & {\\bf %8.0f }& %8.2f ', ... 153 TM1 (prob), TL1 (prob), TM1 (prob) / TL1 (prob)) ; 154 end 155 156 if (TM40 (prob) < TL40 (prob)) 157 fprintf ('{\\bf %8.0f }& %8.0f & %8.2f ', ... 158 TM40 (prob), TL40 (prob), TM40 (prob) / TL40 (prob)) ; 159 else 160 fprintf (' %8.0f & {\\bf %8.0f }& %8.2f ', ... 161 TM40 (prob), TL40 (prob), TM40 (prob) / TL40 (prob)) ; 162 end 163 164 fprintf ('\n') ; 165 166end 167 168RM1 = 1e-9 * (DNN_edges * nfeatures) ./ TM1 ; 169RM40 = 1e-9 * (DNN_edges * nfeatures) ./ TM40 ; 170 171RL1 = 1e-9 * (DNN_edges * nfeatures) ./ TL1 ; 172RL40 = 1e-9 * (DNN_edges * nfeatures) ./ TL40 ; 173 174fprintf ('\n\n') ; 175fprintf ('%% Rate(1e9)[1 thread: MATLAB LAGraph M/L] [40 threads: MATLAB LAGraph M/L]\n') ; 176% rate (in 1e9) 177for prob = 1:12 178 179 if (RM1 (prob) > RL1 (prob)) 180 fprintf ('{\\bf %8.1f }& %8.1f & %8.2f ', ... 181 RM1 (prob), RL1 (prob), RM1 (prob) / RL1 (prob)) ; 182 else 183 fprintf (' %8.1f & {\\bf %8.1f }& %8.2f ', ... 184 RM1 (prob), RL1 (prob), RM1 (prob) / RL1 (prob)) ; 185 end 186 187 if (RM40 (prob) > RL40 (prob)) 188 fprintf ('{\\bf %8.1f }& %8.1f & %8.2f ', ... 189 RM40 (prob), RL40 (prob), RM40 (prob) / RL40 (prob)) ; 190 else 191 fprintf (' %8.1f & {\\bf %8.1f }& %8.2f ', ... 192 RM40 (prob), RL40 (prob), RM40 (prob) / RL40 (prob)) ; 193 end 194 195 fprintf ('\n') ; 196 197end 198 199