Comment by GregarianChild
Comment by GregarianChild 3 days ago
How is this different from superoptimisation?
Also, how do you ensure that newly generated kernels are correct w.r.t. the original naive kernel that you use as specification?
Comment by GregarianChild 3 days ago
How is this different from superoptimisation?
Also, how do you ensure that newly generated kernels are correct w.r.t. the original naive kernel that you use as specification?
If the search space never leaves the programs that are equivalent to the original specification, that will probably limit the optimisations you can discover. (E.g. if you start out with standard matmul, you will not discover Strassen's algorithm.) This is not a criticism, I'm just trying to understand your algorithm.
could be...im not opposed to looking into this to see if there's no possible trajectory from naive to strassen's without leaving logical equivalency.
all the optimizations for matmul so far have been straightforward trajectories from naive (tiling, smem caching, tensor core offload, etc.)
There is an old CACM post that explains how to use a bit of randomness to avoid only doing semantics preserving program changes.
https://cacm.acm.org/research/stochastic-program-optimizatio...
very similar to superoptimisation, but most superoptimisers try to tackle turing-complete code. by just doing a very limited space of computation (linear algebra with 12 primitive ops) the search remains tractable.
the search space is designed to remain logically equivalent at all times, by virtue of how its built (applying rewrite rules we know dont change the logical equivalence).