Mini Project: GPU Accelerated Matrix Multiplication (almost) like cuBLAS
Learn CUDA C/C++ basics by working on a single application: matrix multiplication. To make things interesting, let us try to match the performance of NVIDIA cuBLAS. YouTube video Code repository I will show you two plots side by side. Figure 0.1 shows the Google Trends graph for interest in AI, and Figure 0.2 shows the stock chart on NVIDIA's website. It is no coincidence that as the interest in AI rose, so did the NVIDIA stock value. In the last 10 years or so, the field of AI has been dominated by algorithms using neural networks at their heart. And, at the heart of neural nets, there's matrix multiplication. Over 90% of the neural net's compute cost comes from several matrix multiplications done one after the other [1]. But why does NVIDIA benefit from this? Anyone can do matrix multiplication. I can write it myself in under 15 lines of C++ code. Matrix Multiplication involving square matrices of size n x n Even better, I can use an open-source library like Eigen. Matrix Multiplicat
YouTube video GitHub - tgautam03/xGeMM: Accelerated General (FP32) Matrix Multiplication from scratch in CUDA Accelerated General (FP32) Matrix Multiplication from scratch in CUDA - tgautam03/xGeMM GitHub tgautam03 Code repository I will show you two plots side by side. Figure 0.1 shows the Google Trends graph for interest in AI, and Figure 0.2 shows the stock chart on NVIDIA's website. Figure 0.1: Google Trends showing the interest in AI Figure 0.2: NVIDIA Stock Chart (as of September 2024) It is no coincidence that as the interest in AI rose, so did the NVIDIA stock value. In the last 10 yea
Explore this link on the map →saved by
related reading
- How to Optimize a CUDA Matmul Kernel for cuBLAS-like Performance: a Worklogsiboehm.com
- Inside NVIDIA GPUs: Anatomy of high performance matmul kernels - Aleksa Gordićaleksagordic.com
- Worklog: Optimising GEMM on NVIDIA H100 for cuBLAS-like Performance (WIP) – Hamza's Bloghamzaelshafie.bearblog.dev
- Matrix Multiplication CUDA - ECA - GPU 2018-2019ecatue.gitlab.io
- Outperforming cuBLAS on H100: a Worklogcudaforfun.substack.com
- Outperforming cuBLAS on H100: a Worklogcudaforfun.substack.com
- Learning CUDA by optimizing matrix-vector multiplication (SGEMV) for cuBLAS-like performance - A worklog – Maharshi's blogmaharshi.bearblog.dev
- GitHub - wangzyon/NVIDIA_SGEMM_PRACTICE: Step-by-step optimization of CUDA SGEMM · GitHubgithub.com
- CUTLASS: Fast Linear Algebra in CUDA C++ | NVIDIA Technical Blogdeveloper.nvidia.com
- Reverse-Engineering cuBLASaccu.org
- CUDA C++ Programming Guide (Legacy) — CUDA C++ Programming Guidedocs.nvidia.com
- BrrrVizbrrrviz.com