Re:How to Optimize a CUDA Matmul Kernel for CuBLAS-Like Perf...
by KeplerBoy on Friday July 26, 2024 @02:06PM
(#41080810)
Of course it can be done, it's just a lot of effort. You need parametric kernels you can find optimal configurations for all hardware and input size combinations.
Then there are also numerics: being fast is not enough if your implementation accumulates a lot of rounding errors doing so. Floating point arithmetic can and will mess up your results in unexpected ways. -funsafe famously is neither fun nor safe.
Maybe tooling will catch up and make it easier. Think tinygrad with beamsearch, triton or halide.
Then there are also numerics: being fast is not enough if your implementation accumulates a lot of rounding errors doing so. Floating point arithmetic can and will mess up your results in unexpected ways. -funsafe famously is neither fun nor safe.
Maybe tooling will catch up and make it easier. Think tinygrad with beamsearch, triton or halide.