CUDA benefit diagnostic¶
Generated by benchmarks/cross_binding/cuda_diagnostic.py. The CUDA (cuBLAS) backend now BUILDS (cuda-on preset) and is verified bit-identical to the CPU reference on GPU (rmse_rel = 0 on pcr/pls/mb_pls/gpr_pls, RTX 4090/5090); this report prioritises where it pays off.
Method¶
Proxy = BLAS+OpenMP vs native-scalar speedup at the largest measured n×p (BLAS and CUDA accelerate the same GEMM/GEMV path). An absolute floor is applied FIRST: any op under 1 ms is not_applicable regardless of its (noisy) speedup — CUDA launch + host↔device copy overhead alone exceeds it. Above the floor: benefits = speedup ≥ 1.4 and (grows with size or already ≥ 5 ms); marginal = speedup ≥ 1.2; else not_applicable. The backend is built + correctness-verified; a full live GPU timing sweep (which sizes actually win, given launch + host↔device copy overhead) is the remaining refinement — treat the buckets below as the prioritisation for it. Structurally GEMM-bound core TUs: aom_selection.cpp, gpr_pls.cpp, kernel_pls.cpp, mb_pls.cpp, model.cpp, multiblock_extensions.cpp.
✅ Would benefit from CUDA (2)¶
method |
size |
native ms |
blas+omp ms |
speedup |
grows w/ size |
|---|---|---|---|---|---|
|
250x50 |
11.285 |
7.25 |
1.56× |
yes |
|
250x50 |
6.007 |
3.98 |
1.51× |
yes |
🟡 Marginal / size-dependent (7)¶
method |
size |
native ms |
blas+omp ms |
speedup |
grows w/ size |
|---|---|---|---|---|---|
|
250x50 |
6.681 |
4.352 |
1.54× |
no |
|
250x50 |
4.04 |
2.632 |
1.53× |
no |
|
250x50 |
4.024 |
2.907 |
1.38× |
no |
|
250x50 |
3.29 |
2.639 |
1.25× |
no |
|
250x50 |
5.975 |
4.861 |
1.23× |
no |
|
250x50 |
3.445 |
2.857 |
1.21× |
yes |
|
250x50 |
3.822 |
3.167 |
1.21× |
yes |
⛔ Not applicable (CUDA would be slower) (168)¶
method |
size |
native ms |
blas+omp ms |
speedup |
grows w/ size |
|---|---|---|---|---|---|
|
250x50 |
0.041 |
0.013 |
3.15× |
no |
|
50x250 |
0.008 |
0.003 |
2.67× |
no |
|
250x50 |
0.045 |
0.019 |
2.37× |
yes |
|
250x50 |
0.008 |
0.004 |
2.0× |
yes |
|
250x50 |
0.085 |
0.043 |
1.98× |
no |
|
250x50 |
0.207 |
0.128 |
1.62× |
no |
|
250x50 |
0.017 |
0.011 |
1.55× |
no |
|
250x50 |
0.003 |
0.002 |
1.5× |
no |
|
250x50 |
0.077 |
0.053 |
1.45× |
no |
|
250x50 |
0.089 |
0.062 |
1.44× |
no |
|
250x50 |
0.007 |
0.005 |
1.4× |
no |
|
250x50 |
0.152 |
0.109 |
1.39× |
no |
|
250x50 |
0.132 |
0.095 |
1.39× |
no |
|
250x50 |
0.098 |
0.073 |
1.34× |
no |
|
250x50 |
0.208 |
0.159 |
1.31× |
no |
|
50x250 |
0.43 |
0.331 |
1.3× |
no |
|
250x50 |
0.005 |
0.004 |
1.25× |
no |
|
250x50 |
0.105 |
0.084 |
1.25× |
yes |
|
50x250 |
0.022 |
0.018 |
1.22× |
no |
|
250x50 |
5.833 |
4.921 |
1.19× |
no |
|
250x50 |
0.154 |
0.13 |
1.18× |
no |
|
250x50 |
0.144 |
0.122 |
1.18× |
no |
|
250x50 |
1.249 |
1.069 |
1.17× |
no |
|
250x50 |
0.014 |
0.012 |
1.17× |
no |
|
250x50 |
4.19 |
3.625 |
1.16× |
no |
|
250x50 |
3.164 |
2.762 |
1.15× |
yes |
|
250x50 |
0.008 |
0.007 |
1.14× |
yes |
|
250x50 |
7.392 |
6.546 |
1.13× |
no |
|
250x50 |
4.805 |
4.278 |
1.12× |
no |
|
250x50 |
127.179 |
114.949 |
1.11× |
no |
|
250x50 |
2.901 |
2.612 |
1.11× |
no |
|
250x50 |
899.269 |
810.255 |
1.11× |
no |
|
250x50 |
3.686 |
3.338 |
1.1× |
no |
|
250x50 |
3.671 |
3.351 |
1.1× |
no |
|
250x50 |
0.011 |
0.01 |
1.1× |
yes |
|
250x50 |
0.108 |
0.098 |
1.1× |
yes |
|
250x50 |
0.012 |
0.011 |
1.09× |
no |
|
250x50 |
0.869 |
0.798 |
1.09× |
no |
|
250x50 |
5.298 |
4.849 |
1.09× |
no |
|
250x50 |
0.113 |
0.105 |
1.08× |
no |
|
250x50 |
0.064 |
0.059 |
1.08× |
no |
|
250x50 |
5.119 |
4.723 |
1.08× |
yes |
|
250x50 |
0.015 |
0.014 |
1.07× |
yes |
|
250x50 |
2.995 |
2.808 |
1.07× |
no |
|
250x50 |
2.767 |
2.622 |
1.06× |
no |
|
250x50 |
2.874 |
2.713 |
1.06× |
no |
|
250x50 |
0.125 |
0.118 |
1.06× |
no |
|
250x50 |
248.644 |
234.457 |
1.06× |
no |
|
250x50 |
2.835 |
2.676 |
1.06× |
no |
|
250x50 |
2.707 |
2.556 |
1.06× |
yes |
|
250x50 |
209.158 |
200.04 |
1.05× |
no |
|
250x50 |
5.789 |
5.498 |
1.05× |
no |
|
250x50 |
2319.37 |
2239.376 |
1.04× |
no |
|
250x50 |
2.877 |
2.779 |
1.04× |
no |
|
250x50 |
2.64 |
2.546 |
1.04× |
yes |
|
250x50 |
0.035 |
0.034 |
1.03× |
no |
|
250x50 |
0.412 |
0.4 |
1.03× |
yes |
|
250x50 |
2.877 |
2.787 |
1.03× |
yes |
|
250x50 |
0.061 |
0.059 |
1.03× |
yes |
|
250x50 |
1.332 |
1.298 |
1.03× |
no |
|
250x50 |
0.226 |
0.219 |
1.03× |
no |
|
250x50 |
460.034 |
445.445 |
1.03× |
no |
|
250x50 |
139.195 |
135.084 |
1.03× |
no |
|
250x50 |
546.854 |
537.166 |
1.02× |
no |
|
250x50 |
0.054 |
0.053 |
1.02× |
yes |
|
250x50 |
3.381 |
3.317 |
1.02× |
no |
|
250x50 |
2.819 |
2.752 |
1.02× |
no |
|
250x50 |
459.026 |
449.459 |
1.02× |
no |
|
250x50 |
0.133 |
0.132 |
1.01× |
no |
|
250x50 |
9.178 |
9.075 |
1.01× |
no |
|
250x50 |
1252.074 |
1241.355 |
1.01× |
no |
|
250x50 |
2.65 |
2.613 |
1.01× |
yes |
|
250x50 |
7.656 |
7.601 |
1.01× |
no |
|
250x50 |
786.827 |
776.422 |
1.01× |
no |
|
250x50 |
586.863 |
583.073 |
1.01× |
no |
|
50x250 |
0.007 |
0.007 |
1.0× |
no |
|
50x250 |
0.006 |
0.006 |
1.0× |
yes |
|
250x50 |
1.233 |
1.233 |
1.0× |
yes |
|
250x50 |
0.006 |
0.006 |
1.0× |
no |
|
250x50 |
0.038 |
0.038 |
1.0× |
yes |
|
250x50 |
0.04 |
0.04 |
1.0× |
no |
|
250x50 |
0.002 |
0.002 |
1.0× |
no |
|
250x50 |
0.005 |
0.005 |
1.0× |
no |
|
250x50 |
0.005 |
0.005 |
1.0× |
no |
|
250x50 |
0.001 |
0.001 |
1.0× |
no |
|
250x50 |
28.055 |
28.18 |
1.0× |
yes |
|
250x50 |
0.054 |
0.054 |
1.0× |
no |
|
250x50 |
2.721 |
2.727 |
1.0× |
no |
|
250x50 |
2.519 |
2.531 |
1.0× |
yes |
|
250x50 |
1.207 |
1.207 |
1.0× |
no |
|
250x50 |
0.027 |
0.027 |
1.0× |
yes |
|
250x50 |
0.032 |
0.032 |
1.0× |
yes |
|
250x50 |
0.074 |
0.074 |
1.0× |
no |
|
250x50 |
0.019 |
0.019 |
1.0× |
no |
|
250x50 |
244.809 |
244.659 |
1.0× |
no |
|
250x50 |
0.01 |
0.01 |
1.0× |
no |
|
250x50 |
2.549 |
2.553 |
1.0× |
no |
|
250x50 |
63.856 |
64.282 |
0.99× |
no |
|
50x250 |
2.257 |
2.281 |
0.99× |
no |
|
250x50 |
881.249 |
890.493 |
0.99× |
no |
|
250x50 |
1.054 |
1.061 |
0.99× |
no |
|
250x50 |
2.588 |
2.602 |
0.99× |
yes |
|
250x50 |
5.217 |
5.292 |
0.99× |
no |
|
250x50 |
484.502 |
489.939 |
0.99× |
no |
|
250x50 |
0.509 |
0.52 |
0.98× |
no |
|
250x50 |
3.827 |
3.896 |
0.98× |
no |
|
250x50 |
418.938 |
425.922 |
0.98× |
no |
|
250x50 |
1.5 |
1.529 |
0.98× |
yes |
|
250x50 |
403.396 |
411.566 |
0.98× |
no |
|
250x50 |
2.996 |
3.101 |
0.97× |
no |
|
250x50 |
0.5 |
0.518 |
0.97× |
no |
|
250x50 |
0.155 |
0.159 |
0.97× |
no |
|
250x50 |
0.937 |
0.963 |
0.97× |
no |
|
250x50 |
3.523 |
3.623 |
0.97× |
no |
|
250x50 |
3.536 |
3.671 |
0.96× |
yes |
|
250x50 |
704.945 |
736.865 |
0.96× |
no |
|
250x50 |
1457.833 |
1512.358 |
0.96× |
no |
|
250x50 |
19.474 |
20.317 |
0.96× |
no |
|
250x50 |
0.518 |
0.538 |
0.96× |
yes |
|
250x50 |
0.093 |
0.097 |
0.96× |
no |
|
50x250 |
0.329 |
0.345 |
0.95× |
yes |
|
250x50 |
0.144 |
0.152 |
0.95× |
no |
|
250x50 |
2275.394 |
2383.617 |
0.95× |
yes |
|
200x40 |
1.662 |
1.768 |
0.94× |
no |
|
50x250 |
0.015 |
0.016 |
0.94× |
no |
|
250x50 |
6.273 |
6.699 |
0.94× |
no |
|
250x50 |
0.051 |
0.054 |
0.94× |
no |
|
250x50 |
2.477 |
2.672 |
0.93× |
no |
|
250x50 |
0.445 |
0.478 |
0.93× |
no |
|
250x50 |
0.802 |
0.893 |
0.9× |
no |
|
250x50 |
26.142 |
28.899 |
0.9× |
no |
|
250x50 |
0.991 |
1.101 |
0.9× |
no |
|
250x50 |
3.281 |
3.686 |
0.89× |
yes |
|
50x250 |
0.007 |
0.008 |
0.88× |
yes |
|
250x50 |
0.085 |
0.098 |
0.87× |
yes |
|
250x50 |
0.046 |
0.053 |
0.87× |
no |
|
250x50 |
4.813 |
5.544 |
0.87× |
no |
|
50x250 |
0.569 |
0.659 |
0.86× |
no |
|
250x50 |
2.356 |
2.739 |
0.86× |
no |
|
250x50 |
3.989 |
4.663 |
0.86× |
no |
|
250x50 |
0.282 |
0.327 |
0.86× |
yes |
|
250x50 |
0.006 |
0.007 |
0.86× |
yes |
|
250x50 |
0.006 |
0.007 |
0.86× |
yes |
|
250x50 |
0.029 |
0.034 |
0.85× |
no |
|
250x50 |
1.491 |
1.764 |
0.85× |
no |
|
250x50 |
756.746 |
887.221 |
0.85× |
no |
|
250x50 |
4.253 |
5.092 |
0.84× |
no |
|
250x50 |
0.005 |
0.006 |
0.83× |
yes |
|
250x50 |
0.539 |
0.649 |
0.83× |
no |
|
250x50 |
13.879 |
17.196 |
0.81× |
no |
|
250x50 |
3.097 |
3.886 |
0.8× |
no |
|
250x50 |
0.444 |
0.563 |
0.79× |
yes |
|
250x50 |
16.589 |
21.333 |
0.78× |
yes |
|
250x50 |
6.344 |
8.242 |
0.77× |
yes |
|
250x50 |
3.844 |
5.12 |
0.75× |
yes |
|
250x50 |
3.636 |
4.922 |
0.74× |
yes |
|
250x50 |
0.062 |
0.084 |
0.74× |
yes |
|
250x50 |
0.005 |
0.007 |
0.71× |
no |
|
250x50 |
0.062 |
0.088 |
0.7× |
yes |
|
250x50 |
0.019 |
0.029 |
0.66× |
no |
|
250x50 |
1.572 |
2.394 |
0.66× |
yes |
|
250x50 |
0.58 |
0.885 |
0.66× |
no |
|
250x50 |
6.567 |
10.253 |
0.64× |
no |
|
250x50 |
0.009 |
0.014 |
0.64× |
yes |
|
250x50 |
0.004 |
0.007 |
0.57× |
yes |
|
250x50 |
0.002 |
0.004 |
0.5× |
yes |
|
250x50 |
0.006 |
0.028 |
0.21× |
yes |
|
250x50 |
0.005 |
0.027 |
0.19× |
yes |
Caveats¶
Proxy only: a real CUDA backend must beat host↔device transfer + launch latency, which the BLAS proxy doesn’t capture. CUDA typically wins only well above the dashboard sizes (large n and/or p).
Methods in the
benefitsbucket that alsogrow with sizeare the highest-value CUDA targets (kernel/Gram-matrix PLS, GPR-PLS, multi-block, SVD/PCR, AOM selection).Re-run after adding larger benchmark sizes or live
cuda-ontimings for a sharper verdict.