Using AI programming problem solvers to help develop Julia Linear Algebra ecosystem

We’ve had yet another instance of slow matrix operation due to generic fallback.

This is not the only one for example.

Guess what? We have a set of self-contained problems with known ground truth (implemented by the generic fallbacks).

You know what? This screams like it’s a good time to use something like Alphacode.

We have some open-source versions like this one:

The plan is simple.

  1. Define a search space of arrays, matrices, etc (including ones like maybe Transposed XXX matrix or whatever).
  2. Benchmark the generic implementation as a baseline.
  3. Use Alphacode or similar algorithms to generate specialized dispatches for all the esoteric operations out there, benchmark them, and integrate the result much faster than generic methods.
  4. Perhaps do some pruning where you prune out some specialized logic already covered by a more generic code.
  5. Perhaps manually review the generated code.

Who wants to do it? Who wants to lead the effort? I might be able to help (might be, not guaranteed). This could be a good test case on whether or not AI code generation could significantly help software development beyond the “vibe coding” trend.

Hopefully, this one is an achievable idea. I do not know if it would turn out to be yet another hard idea but I think this one is a small idea.

1 Like

Please do it

Let’s break it down then. The step 2 is trivial. Step 4 needs step 1,3 to figure out the result first. Step 5 is likely optional.

The first step are that I need to get one of the Alphacode or similar algorithms working, and another thing is that I need to define the search space. However, I do not know every type of search space and the behaviors of their domains. For example, sparse matrices need to actually be sparse to be worthwhile, whereas triangular matrices need to be triangular, and so on. We would need to list the matrices and so on and their search space if we want to try these.

Then comes the issue of Alphacode itself. I’ve never tried installing and using this software and its API. Not sure if it would be easy or difficult, and we still need to connect them to the benchmarks. What next? Who’s going to help me with these 2 steps?