what will you learn by the end of this?


π€ why would increasing the size of a matrix make matmul faster?




Each SM has can execute in parallel
GA100 has 128 SMs
Concept π§© π The closer the memory to SM, the faster it is: L1 and shared memory is inside the SM. L2 cache is on die, global memory are on memory chips next to GPU
L1 and L2 cache is shared memory (SRAM): more expensive and more power hungry

Matmul is faster than floating point operations (additions, multiplications)
compute is scaling faster than memory
memory bandwidth is the bottleneck
Prefill phase is memory bound and is one chip
TODO Practical see Stanford CS365 practical on GPUs.
Practical on counting FLOPS using PyTorch and here using TorchDispatchMode