~/talk

Hidden GEMMs: How Optimized Math Libraries Work

Talkat Data By the Bay 2016 · 2016-05-16..05-20· [machine-learning]
links:none on file
slides:none on file

Shows how a naive C triple loop yields ~1,200 ms while simple loop reordering cuts that to ~167 ms and cache-aware tiling plus ICC brings it to ~56 ms (NumPy 74 ms, MATLAB/MKL ~20 ms). On GPU a naive kernel is ~280 ms; using shared-memory tiling, coalesced access and avoiding bank conflicts drops kernels to ~48–55 ms and cuBLAS hits ~11 ms; a Titan X can reach ~1 ms. Techniques and tradeoffs are measured and shown to work.

AI-written summary · about

  1. 0:00Intro
  2. 1:31Outline
  3. 2:09Why bother?
  4. 3:21GEMM in Cholesky and LU
  5. 3:33GEMM definition
  6. 4:04Test machine specs
  7. 5:43CPU - Naive GEMM (C-like Java*)
  8. 5:57CPU - Naive GEMM (C-like Python*)
  9. 6:22CPU GEMM in Octave/MATLAB
  10. 6:35Modern CPUs
  11. 7:27Trip through the Intel pipeline
  12. 8:59Seq Access and Prefetch
  13. 10:01GEMM with loop reordering
  14. 11:49CPU - Tiled GEMM
  15. 12:52CPU Tiled GEMM - GCC
  16. 13:15CPU Tiled GEMM - ICC
  17. 14:14Pointer Aliasing
  18. 15:25CPU Pipeline Clock cycle
  19. 15:46CPU Pipeline Bubble
  20. 16:13CPU Loop Unrolling
  21. 17:03Packed add (GCC fail)
  22. 17:55Other algorithms
  23. 19:25More CPU tweaks - intrinsics
  24. 19:50Fused multiply-add (FMA)
  25. 21:32GPU Design Decisions
  26. 25:50CUDA Steps (Host Perspective)
  27. 26:53GPU - Naive Global GEMM
  28. 28:19GPU - Shared GEMM (Tiling) Global Memory
  29. 29:19Aligned / Coalesced Global Mem.
  30. 30:02Aligned + Coalesced Access
  31. 30:25Misaligned, Coalesced Access
  32. 30:50Misaligned + Uncoalesced Access
  33. 31:08Aligned + Coalesced vs. Strided
  34. 31:53Coalesced Global Memory
  35. 32:42Shared Bank Conflict Resolution
  36. 33:28GEMM via outer product
  37. 35:31GPU Computation Optimization
  38. 35:47Recap
  39. 36:45CUBLAS GEMM - Titan X
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.