Open junjihashimoto opened 3 months ago
Pretty excited to incorporate some autotuning functionality in the library.
On the exception handler, I need to have a closer look. What are the condition where the exception gets thrown? Some additional discussion on errors here https://github.com/AnswerDotAI/gpu.cpp/pull/49#issuecomment-2304744353 - can chat more in the discord chat.
I was thinking about a more generic mechanism for autotuning. There could be some higher order function that takes:
The autotuner then sweeps through each parameter set and runs it N times. It then returns, for each parameter set, the N values of running times. Something like hyperfine https://github.com/sharkdp/hyperfine except operating on a parameter set and a function as input.
This PR implements autotune for matmul. To skip unacceptable parameters with runtime-exception, it also implements additional exception-hander to catch exceptions on main-thread.