‹ BackHN Continuity

Thread

Show HN: Agentic CUDA Kernel Optimizer

37 points · 11 comments · bertaye

Loading the complete thread in the background. This saved snapshot is available now. Refresh

  1. asamadx · · focus · HN ↗

    [dead]

    1. bertaye · · focus · HN ↗
      That is the funny part actually; we can either provide a reference kernel for correctness check or let AI to create a very basic reference implementation :D for my own experiments I used second one
      1. saagarjha · · focus · HN ↗
        How are you checking that the AI is not just gaming your correctness tests? It's very easy to write incorrect synchronization for example.
        1. bertaye · · focus · HN ↗
          It cant if you be cautious about it because the inputs can set manually and outputs are generated through the cuda harness by executing the reference kernel, again can be provided externally.

          Comparison is simply byte by byte equalness check of reference kernel outputs with candidate (optimized) outputs.

          Why I added ai generated inputs then? I was just being lazy and this was more of a langgraph playground for me:)

          1. saagarjha · · focus · HN ↗
            Yes, but the AI can totally make a kernel that passes your test inputs but is not correct
  2. generalizations · · focus · HN ↗
    Very cool. Did you also try using the karpathy autoresearch? How do you think this compares?
    1. bertaye · · focus · HN ↗
      honestly I know it exists but I never used it so can't compare
  3. lohr13 · · focus · HN ↗

    [dead]

  4. fooblaster · · focus · HN ↗
    Can someone explain why this isn't better accomplished through a single prompt to Claude code or codex? I don't think I understand.
    1. osti · · focus · HN ↗
      Yup, this thing is basically useless. I just did /goal optimize the cuda kernel, and ai agent just proposed and tested a bunch of ideas by itself, and it profiled them using nsight ncu etc. by itself, which lead to one order of magnitude faster kernel.
    2. bertaye · · focus · HN ↗
      Hello, indeed you can just use that.

      The basic idea here is just automating and limiting the steps that AI can take. These are described as ‘nodes’ and their actions are limited/more descriptive from developer perspective.

      The langgraph simply allows you to set some fences around the AI agent for a goal, instead of raw terminal flow. Is it better? Arguable.

  5. aidiveyt · · focus · HN ↗
    in mine, only an agent's final report reaches the orchestrator, never its transcript, so a wrong turn inside a node stays invisible. that's the fence i'd want first.
  6. gradusfyi · · focus · HN ↗

    [dead]

  7. mahi1224 · · focus · HN ↗

    [dead]

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.