Auto-research with codex: How I achieved a 232x Faster Kernel

(sankalp.bearblog.dev)

30 points | by tosh 1 hour ago

4 comments

  • Almondsetat 15 minutes ago
    In the last couple of days I wanted to try out the new definitive DeepSeek v4 releases. I gave it the repository of a semi-abandoned video compression codec and I told it to perform the usual benchmark -> profile -> verify -> research -> improve loop. I specifically chose this codec because the authors include a verifier for the bitstream to make sure you don't break stuff if you want to try your own implementation. I gave the agents access to the compiler's profiler and also Intel's VTune, which has fantastic output. In a couple of hours the LLM generated SSE and AVX implementations of the compression and decompression algorithms that almost doubled performance with a single core. Then I asked it to create a CUDA implementation using NVIDIA's NSIGHT profiler as a guide and it also started doing some good work.

    Personally, I believe that LLMs should be treated like an advanced version of Prolog or linear programming: you give the constraints, you have a way of verifying correctness, and you give it a clear goal. If the LLM can verify itself and course-correct you can basically leave it on autopilot

    • rrhjm53270 1 minute ago
      I tried kernel autoreasearch using DeepSeek-V4-Flash as well. It spent about 1-2 hours to complete the FlashAttention optimization job (https://github.com/fengwang/FA5090/tree/main/v7) and cost me only $0.2. I believe we are ready to offload a lot of this kind well-defined constrained optimization problems to AI Agent autoresearch.
    • _zoltan_ 1 minute ago
      This is exactly how I use it. I mean not on abandoned repos, but in a benchmark - profile - verify - research - improve loop.
  • tosh 5 minutes ago
    Training material seems to be especially rich re GPU kernels and SIMD.

    I wonder if there is extra effort put into this because they are useful for the researchers working on the models or just a sub-domain that language models are a great fit for and humans have trouble with?

  • spacemanspiff01 2 minutes ago
    This is really cool - I really like the beam search idea,
  • Jackobrien 6 minutes ago
    Damn! If a solo engineer can do this, it makes the most around OAI/Anthropic start to look pretty weak.