Surprisingly fast AI-generated kernels we didn't mean to publish yet

398 points by mfiguiere 2 days ago | 204 comments
  • miki123211 1 day ago
    I think how the authors of this post think about "AI agents" is really interesting.

    Most people think of agents like they think of human employees. They set up a limited number of agents to run in parallel (often just one), with each agent running in a loop and doing one task at a time. They're still in a world where you have a fixed (on the timescale of hours or days) number of employees, each employee can only do one thing at a time, and transferring tasks between employees is slow and costly.

    LLMs don't really work like that. You effectively have an infinite number of agents that you can conjure out of thin air at any time. There's no cost advantage to performing LLM requests in series rather than in parallel.

    If you realize this, the pattern of each agent fanning out and forking itself into as many sub-agents as are needed to fulfill the task becomes obvious. This is exactly what the authors have done.

    I think a better way to think of agents is as "tasks" or "jobs", like those you might find in Celery or sidekik, and apply the learnings from those.

    • neom 1 day ago
      For fun last month I decided to see if i could build a fully functional business of agents. It's 175 python files (employees) build up of internal roles within those files (tasks). So what I have is 175 employees who are able to pass output around each other, understand the work, complete the work, understand where to send the output. The whole system has the ability to do around 275 base processes (same as a business at > 100MM arr) I started on a Friday afternoon and slept a little bit and finished on Monday afternoon. After I had it running I sent it to a VC friend to show them and they sent back the deck of a startup that is in stealth with $25MM doing it the exact same way. With 1 month and a designer and an engineer, I could have it mvp functional for anyone to use ($40k?). Times are changing. Here is kinda how it looks: https://s.h4x.club/9ZuO4XQR / https://s.h4x.club/jkuB8ZED (I've evolved it a little since this, and if you're an engineer and look at my files and think, this guy is a moron: I know!:))
      • yusina 1 day ago
        > understand the work

        LLMs don't understand. It's mind-boggling to me that large parts of the tech industry think that.

        Don't ascribe to them what they don't have. They are fantastic at faking understanding. Don't get me wrong, for many tasks, that's good enough. But there is a fundamental limit to what all this can do. Don't get fooled into believing there isn't.

        • motorest 1 day ago
          > LLMs don't understand. It's mind-boggling to me that large parts of the tech industry think that.

          I think you might be tied to a definition of "understanding" that doesn't really apply.

          If you prompt a LLM with ambiguous instructions, it requests you to clarify (i.e., extend prompt to provide more context) and once you do the LLM outputs something that exactly meets the goals of the initial prompt, does it count as understanding?

          If it walks like a duck and quacks like a duck, it's a duck,or something so close to a duck that we'd be better off calling it that.

          • GoatInGrey 1 day ago
            I don't believe the user meant "understand" in the classical biological and philosophical sense, or were otherwise attempting to anthropomorphize the systems. They were speaking from the practical experience of "this thing takes a somewhat ambiguous input with unique constraints and implements the ask more-or-less as intended".
            • squidbeak 23 hours ago
              They understand. Anything able to reason about any arbitrary request and form a plan tailored to that request understands well enough to qualify for the verb. The mechanism behind it may feel hollow or fake. But if its responses reliably show understanding, the LLM understands - by any ordinary measure.
              • hayst4ck 1 day ago
                Nearly every argument like this has the same fatal flaw, and it's generally not the critique of the AI, but the critique reflected back on to humans.

                Humans also don't understand and are frequently faking understanding, which for many tasks is good enough. There are fundamental limits to what humans can do.

                The AI of a few months ago before OpenAI's sycophancy was quite impressive, less so now which means it is being artificially stunted so more can be charged later. It means privately it is much better than what is public. I can't say it "understands," but I can say it outclasses many many humans. There are already numbers of tasks based around understanding where I would already choose an LLM over a human.

                It's worth looking at bloom's taxonomy (https://en.wikipedia.org/wiki/Bloom%27s_taxonomy): In the 2001 revised edition of Bloom's taxonomy, the levels were renamed and reordered: Remember, Understand, Apply, Analyze, Evaluate, and Create. In my opinion it is at least human competitive for everything but create.

                I used to be very bearish on AI, but if you haven't had a "wow" moment when using one, then I don't think you've tried to explore what it can do or tested it's limits with your own special expertise/domain knowledge, or if you have then I'm not sure we're using the same LLMs. Then compare that experience to normal people, not your peer groups. Compare an LLM to people into astrology, crystal healing, or homeopathy and ask which has more "understanding."

                • zenburnmyface 1 day ago
                  meh. I feel this is just a linguistic shortcut, similar to how _trained_ biologists can talk about a species or organism evolving some trait. Of course the organism isn't _really_ evolving with any goal in mind, but that's clear to the speaker and audience. Whether or not LLMs understand (very unlikely), it's clear what we mean by an LLM "understanding": has the context + prior training to make reasonable predictions. But no one wants to write that each time.
                  • bobxmax 1 day ago
                    How do you know?
                    • neom 1 day ago
                      What is the limit my system will reach?
                      • rzz3 1 day ago
                        Thats an interesting word to pick on. Understanding still means something here in a relative sense.
                        • holoduke 22 hours ago
                          Definition of understanding is based on connecting relations. If there is one thing a llm can do its connecting relations. So I am not sure why you say llms are not understanding.
                          • GaggiX 1 day ago
                            They understand tho, it's different than how it's done in our brain but they solve task that would be impossible to do without understanding. I would even say that they can now reason through problems thanks to powerful reasoning models like Gemini 2.5 Pro and o3.
                            • vasco 1 day ago
                              Asking a short question but in a serious way: so what?
                            • acchow 1 day ago
                              > The whole system has the ability to do around 275 base processes

                              It’s incredibly easy to get LLMs to do a lot of stuff that seems convincing.

                              They are literally trained for plausibility.

                              • robbomacrae 1 day ago
                                Is anyone else annoyed that VC's are out there sharing decks of startups in stealth with potential competitors? How often does this happen?
                                • eterm 1 day ago
                                  I would be annoyed along with you if I thought the post was true.
                                • mucha 22 hours ago
                                  Cool. What goods/services does your business provide to customers?
                                  • neom 15 hours ago
                                    Goods and services are a byproduct of business, business is primarily concerned with systems and processes that facilitate value exchange, so my tool, can work with a user, to build a business, not a product or a service. If you bake cupcakes, my tool can get you 100 people at your door, it cannot open the door or provide the cakes.
                                  • literalAardvark 1 day ago
                                    Engineers who would judge someone's frontier MVP like that are not even worth worrying about.

                                    This is epic work. Would love to see more of it but I guess you're gonna take it the startup route since you have connections. Best of luck.

                                    • neom 1 day ago
                                      Thanks!!! I decided not to build it, that space is already too busy, there is a startup with $25MM in stealth, who else is in stealth? On top of that, this method will get stale very very quickly, foundation model businesses are just too hard to work around right now, it's a silly way to do business. My magic is I've build a startup from scratch to over 400 people and watched what they do, it won't be long till that isn't worth much.
                                    • jprokay13 23 hours ago
                                      I’ve been floating around a similar set of ideas and it’s been very fun (if not all that useful yet) to build Did you try taking it one step further where a “recruiter” has to hire the engineers after a screening process? I wonder if this could get you even better AI engineers
                                      • iammrpayments 1 day ago
                                        Sounds really interesting but I have no idea what’s the purpose of having 175 “employees” here? Maybe it is a smart way to sell the idea you’re going to replace 175 people if you buy the product? Could just buy chatgpt instead I guess, but a chatbot doesn’t sound as cool as 175 employees.
                                        • neom 1 day ago
                                          I would love to know how to do it another way if you have any ideas, I'm sadly not experienced or intelligent enough to think of another way to do it.
                                        • immibis 1 day ago
                                          Does this experiment do anything useful or does it just soak up investor money? Not that there's anything wrong with the latter.
                                          • neom 1 day ago
                                            The only investor is me. I build it on my own over a weekend, on my own. I just wanted to confirm it can be done therefore will exist, that is all. Personally, I decided not to peruse it because I am old and lazy and don't want to compete against a16z and sequoia funded adderall filled teenagers.
                                          • wslh 1 day ago
                                            Your message doesn't make it clear what those 175 employees can realistically accomplish on their own.

                                            For instance, you might have an SEO expert on the team, but that alone won't guarantee top search engine rankings. There are countless SEO professionals and tools (human or AI-powered), and even having the best one doesn't eliminate the underlying challenge: business competition. LLMs, like any other tool, don’t solve that fundamental problem.

                                            • neom 1 day ago
                                              No employees accomplish anything on their own in the real world, all employees are part of a team. That's why I designed a business strategy and analysis layer (over half the system, in fact), with web tools and connections to all of the insights systems (like mix panel). I built the exact same thing I build at digitalocean but instead of humans I defined them with code, digitalocean runs just fine, so does my LLM system. The whole system I build is self learning, insight gathering and refinement. Competition is for losers, the best teams win via the best insights.
                                            • catlifeonmars 22 hours ago
                                              This really sounds like a “faster horse” scenario and totally misses the point of the GPs comment: why shackle yourself to modeling the way humans work?
                                              • neom 15 hours ago
                                                Humans modeled time, and morning and night are real.
                                            • londons_explore 1 day ago
                                              > forking itself into as many sub-agents as are needed to fulfill the task

                                              The forking is free. Running the sub-agents is linear cost, but the expensive bit is joining the agents responses back together again.

                                              If a task has 6 subtasks and an agent is spawned for each, at some point some 'joiner' agent needs to parse and summarize the findings of the sub agents and feed it back to the parent. That step necessarily involves information loss, and uses more computation that a single linear agent design would not use.

                                              • neom 1 day ago
                                                I designed something for a business and found I needed 4 major sub-systems (like a real business) - insight/data, cognition, meta cognition and execution, and if you don't define all 4, the system is junk.
                                                • motorest 1 day ago
                                                  > I designed something for a business and found I needed 4 major sub-systems (like a real business) - insight/data, cognition, meta cognition and execution, and if you don't define all 4, the system is junk.

                                                  Might it be just another realization of Conway's law?

                                                  https://en.wikipedia.org/wiki/Conway%27s_law

                                                  Might it be possible that the only reason you're assuming a system is junk is just that it doesn't resemble the systems you know and expect? There are so many ways to skin a cat, and certainly no business process represents the optimal process.

                                              • yusina 1 day ago
                                                > You effectively have an infinite number of agents

                                                You don't.

                                                Sincerely, Your Electricity Bill

                                                • dwohnitmok 18 hours ago
                                                  > If you realize this, the pattern of each agent fanning out and forking itself into as many sub-agents as are needed to fulfill the task becomes obvious.

                                                  And this is precisely how really bad things could happen:

                                                  https://www.lesswrong.com/posts/kpPnReyBC54KESiSn/optimality...

                                                  • TimPC 1 day ago
                                                    The challenge with fan out is constructing a linear conversation that makes sense that captures previous history. In any context where the LLM needs that information linear loops often perform better than trying to splice together conversations from multiple parallel processes.
                                                    • kposehn 1 day ago
                                                      This is similar to something we've been doing for a while. Instead of individual agents we are creating many iterations and sub-iterations of spawned agents that are largely autonomous. A lot of the human-centric paradigms just don't really apply to LLMs/AI but people are used to approaching them that way.
                                                      • viraptor 1 day ago
                                                        > They set up a limited number of agents to run in parallel (often just one),

                                                        Most of what people use agents for daily can often be one-shotted though and even collating/rating 10 results would be costly.

                                                        If I had a harness for evaluating the results and VC level money, I'd be throwing an army at well defined experimental tasks as well.

                                                      • ekelsen 1 day ago
                                                        "FP32 is less common in modern ML workloads and often less optimized on recent hardware compared to FP16 or BF16, which may partly explain why it’s easier to achieve performance gains over PyTorch with FP32 kernels."

                                                        People haven't spent time optimizing the fp32 versions of these kernels in years. This will be much more interesting if they can improve the kernels where developer effort has gone and that are actually used.

                                                        • adrian_b 1 day ago
                                                          I believe that these good results are explained at least in part by the fact that NVIDIA does not provide detailed enough documentation for their GPUs.

                                                          For a processor with well-documented microarchitecture, for which a programmer or a compiler can deterministically write an optimal program, it is much less likely that applying ML/AI can be successful, except as a substitute for searching already known solutions.

                                                          On the other hand, for less documented microarchitectures, like of the NVIDIA GPUs, finding an optimal program may be impossible other than by doing a random search guided by examples of previous optimized programs, and possibly doing some reverse-engineering work to determine the real behavior of the GPU in some circumstances.

                                                          Improving over something like this is likely to be feasible for ML/AI, where training over known good programs may be able to extract some of the undocumented behavior that may be non-obvious for humans reading those examples.

                                                          • mjlee 1 day ago
                                                            > For a processor with well-documented microarchitecture, for which a programmer or a compiler can deterministically write an optimal program

                                                            We don't even know the optimal algorithms! AlphaEvolve recently found "an algorithm to multiply 4x4 complex-valued matrices using 48 scalar multiplications, improving upon Strassen’s 1969 algorithm that was previously known as the best in this setting." - https://www.nature.com/articles/s41586-022-05172-4

                                                            • adrian_b 13 hours ago
                                                              I was not referring to algorithm designing, but to algorithm implementation on a given processor, which consists in things like register allocation, machine instruction selection and static instruction scheduling.
                                                              • hmry 1 day ago
                                                                For those who don't want to read the article: The previous best was 49 scalar multiplications.
                                                              • david-gpu 1 day ago
                                                                > For a processor with well-documented microarchitecture, for which a programmer or a compiler can deterministically write an optimal program

                                                                You severely underestimate the landscape of possible implementations for these kernels. There are many ways of performing a matrix multiplication and predicting which one will perform best without running them all is nontrivial, even with perfect knowledge of the underlying system.

                                                                This is just a completely incorrect take, speaking as a former insider.

                                                                • adrian_b 13 hours ago
                                                                  If you cannot predict the running time of an algorithm without running it on the target processor, then by definition the documentation of that processor is incomplete.

                                                                  For a processor that is completely documented one must be able to run a simulation model that provides the running time for a given program, when the processor is so complex that simpler methods for computing the execution time do not work.

                                                                  For older NVIDIA GPUs, there exist such simulation models, but they are only partially accurate, because they are based on reverse engineering, without cooperation from the GPU vendor.

                                                                • pca006132 1 day ago
                                                                  While it is decidable, people typically never produce optimal programs even for the hot path. It is just intractable and too slow to do right now.

                                                                  For register allocation and instruction selection, there is hope because it is FPT and there are algorithms to do it optimally in polynomial time, albeit with a large constant factor (FPT), making it impractical to apply to compilers as of today. For instruction scheduling, it is just too hard. If you read literature on scheduling algorithms, it is NP-hard for apparently simple instances, e.g., 2 parallel identical machines with no preemption and bounding completion time (https://www2.informatik.uni-osnabrueck.de/knust/class/), while actual microarchitecture is much more complicated than this...

                                                                  Needless to say, these are already the simpler problems. The longer the program or the more profiling data you can optimize for, the more tricks you can throw at it, and most of them are NP-hard to optimize optimally.

                                                                  Being NP-hard doesn't imply that you can't obtain the optimal result, but compilers that I know of do not implement them, because most users are not willing to wait for days for such a compilation to complete. Ideally, one should make something that can run on clusters of CPUs or GPUs to optimize this, and people having those clusters will typically be willing to do this because they want to optimize the program they later run on the clusters. However, to my knowledge, no one is working on this at the moment.

                                                                  • adrian_b 12 hours ago
                                                                    While you are right that in general it may be very difficult or quasi-impossible to generate optimal programs, there are also plenty of cases where an optimal program is achievable.

                                                                    The latter happens when there is one dominant bottleneck for the algorithm, which is determined by the hardware, e.g. the maximum throughput of a certain instruction, like multiplication or memory load. When the implemented program reaches a throughput almost equal with that absolute limit, then one can be certain of its optimality.

                                                                  • fulafel 1 day ago
                                                                    Even with full information, we generally (or practically) aren't able to write optimal programs.
                                                                    • almostgotcaught 1 day ago
                                                                      [flagged]
                                                                      • pca006132 1 day ago
                                                                        While I think the OP did not mean the compilation process is nondeterministic, I won't be surprised if it is actually non-deterministic. A lot of algorithms and data structures rely on nondeterminism for performance or security (by default). It is too easy to introduce nondeterminism accidentally, and it is tempting to use that to speed up algorithms. Also, if it relies on floating point, results on different machines and environments may be different (depending on libm and hardware implementation), which is, in some sense, nondeterministic.
                                                                        • throwaway81523 1 day ago
                                                                          The running time of a CUDA kernel is apparently impossible to determine except by experiment and measurement, and might be nondeterministic. By contrast for a more typical CPU, there's a compiler whose assembly output you can examine, and there's a processor manual that gives the cycle timing of each instruction. So you can compute the running time at least of inner loops that stay in cache, and that sort of thing.
                                                                          • speerer 1 day ago
                                                                            The point was about being able to write an optimal program with certainty, not about just getting the thing to operate.
                                                                        • suddenlybananas 1 day ago
                                                                          I wonder if it's using known improvements from the fp16/bf16 kernels that are transferable to fp32?
                                                                          • 1 day ago
                                                                            • moralestapia 1 day ago
                                                                              >People haven't spent time optimizing the fp32 versions of these kernels in years.

                                                                              Wow, so, you're basically saying the AI created new algos in a domain with no pre-existing solutions? Awesome!

                                                                              • Aurornis 1 day ago
                                                                                No one said the AI created new algorithms nor that there weren’t pre-existing solutions.

                                                                                The implication was that the FP32 versions of these kernels have lagged behind the more popular versions. There was opportunity to translate the advancements from other kernels into these. Someone would need to look closely to see exactly what was done, but it’s premature to suggest anything like “new algos” or “no pre-existing solutions”

                                                                                This is a great use case for LLMs, though. I often do something similar where I make improvements to something I use most frequently and ask an LLM to translate that pattern to other similar parts of the code.

                                                                                • moralestapia 1 day ago
                                                                                  >The implication was that the FP32 versions of these kernels have lagged behind the more popular versions.

                                                                                  Help me understand this 'cause I'm a bit slow these days ...

                                                                                  Does that mean optimized FP32 versions of these kernels were already there or not?

                                                                                • vlovich123 1 day ago
                                                                                  The solution not existing in PyTorch does not mean the solution doesn’t exist elsewhere on the internet. Remember - PyTorch is largely maintained by employees of companies that have their own priorities for the SW and those priorities may not include hyper optimizing fp32 kernels.

                                                                                  That being said, it is cool if AI is enabling lower cost adoption of better more optimized kernels with less effort.

                                                                                  • imtringued 1 day ago
                                                                                    Read the article before spouting lies. Actually never mind that.

                                                                                    Read the damn comment you're responding to. There have been human written kernels for both fp16 and fp32 for a long time.

                                                                                    Here is the corrected version of your comment:

                                                                                    "Wow, so, you're basically saying the AI created the same but faster algos in a well known domain with established pre-existing solutions, whose overall impact on the runtime of practical workloads is insignificant? Awesome!"

                                                                                    • uoaei 1 day ago
                                                                                      The hype cycle in action, folks. Pay heed.
                                                                                      • 1 day ago
                                                                                  • thorum 1 day ago
                                                                                    My takeaway - from this article, from Google’s AlphaEvolve [1], and the recent announcement about o3 finding a zero day in the Linux kernel [2] - is that Gemini Pro 2.5 and o3 in particular have reached a new level of capability where these ideas that were tried unsuccessfully with other models, suddenly just work.

                                                                                    [1] https://deepmind.google/discover/blog/alphaevolve-a-gemini-p...

                                                                                    [2] https://sean.heelan.io/2025/05/22/how-i-used-o3-to-find-cve-...

                                                                                    • therealpygon 1 day ago
                                                                                      In my opinion, I wouldn’t say so much that they are suddenly working. Rather we’ve reached a point where they can iterate and test significantly faster than humans are capable of doing and have the ability to call on significantly more immediately available information that it can make sense of, and as a result, the combination information, advancement and intelligently applied brute force seems to be having success in certain applications.
                                                                                      • thorum 1 day ago
                                                                                        Good points. I suspect that o3 is able to reason more deeply about different paths through a codebase than earlier models, though, which might make it better at this kind of work in particular.
                                                                                        • westoncb 1 day ago
                                                                                          I was blown away by some debugging results I got from o3 early on and have been using it heavily since. The early results that caught my attention were from a couple cases where it tracked down some problematic cause through several indirect layers of effects in a way where you'd typically be tediously tracing step-by-step through a debugger. I think whatever's behind this capability has some overlap with really solid work it'll do in abstract system design, particularly in having it think through distant implications of design choices.
                                                                                          • MangoToupe 1 day ago
                                                                                            In the context of LLMs, what do you mean by "reason"? What does reasoning look like in LLMs and how do you recognize it, and more importantly, how do you invoke it? I haven't had much success in getting LLMs to solve, well, basically any problem that involves logic.

                                                                                            Chain of thought at least introduces some skepticism, but that's not exactly reasoning. It makes me wonder what people refer to when they say "reason".

                                                                                            • therealpygon 1 day ago
                                                                                              Very likely. Larger context is significantly beneficial to the LLMs when they can maintain attention, which was part of my point. Imagine being able to hold the word for word text of your required reading book while you are taking a test, while older models were more like a couple chapters worth of text. Two years ago.
                                                                                          • geraneum 1 day ago
                                                                                            It’s true that there are similarities between what you mentioned and what’s happening in this case. From the article:

                                                                                            > The result is a test-time loop that looks less like “chat with a compiler” in the case of sequential revision, and more like structured exploratory search, guided by explicit optimization hypotheses and aggressively parallel evaluation.

                                                                                            My conclusion would be that we’ve now learned to apply LLMs’ capabilities to shrink solution space where we have a clear evaluation function as well as solutions to problems that might follow similar patterns. This applies in this case as well.

                                                                                            IMO, It’s not about model X gaining on other models or model Y being able to reason about the solutions, etc. in a way that other models couldn’t.

                                                                                            • jiggawatts 1 day ago
                                                                                              Gemini Pro 2.5 is the first AI that I can productively use for anything other than human language translation, but it's just barely crossed that threshold. Sometimes I get success hit rates below 20%.

                                                                                              When 3.0 comes out, that... that's going to start getting a little scary.

                                                                                              • manmal 1 day ago
                                                                                                o3 is in my experience often even better, but too slow and too rate limited to use it all the time.
                                                                                                • jacob019 1 day ago
                                                                                                  What domain?
                                                                                                  • jiggawatts 1 day ago
                                                                                                    SRE / DevOps / coding mostly in the Azure and .NET ecosystems.

                                                                                                    The problems I have to solve tend to be the horrible ones that nobody has answers to, anywhere on the Internet, so unsurprisingly the AIs aren't good at it either.

                                                                                                    The trick has been to use the AIs for what they are good that, which used to be "nothing" for me at least, but now I can use them productively for certain "spot" tasks.

                                                                                                    Random examples:

                                                                                                    - Cross-language and cross-platform benchmarking of a bunch of different database clients to see how they stack up. I gave the AI a working example in one language and got it to whip up a series of equivalents with other DB drivers and languages. Sure, it's trivial, but it's way faster than doing it myself!

                                                                                                    - Crash dump analysis using WinDbg. I read somwhere that "vibe debugging" of kernel dumps totally works, so when I had an actual crash I gave it a go for laughs. With AI help I managed to extract the name of the specific file that had NTFS corruption and was crashing the server. Deleted the file, restored it from backups, and the server was good to go again!

                                                                                                    - If you ever watch the top mechanical engineers on YouTube, they all make their own tools instead of just buying them. Jigs, extenders, unusual sizes, etc... IT work is the same. As a recent example, I got Gemini to make me a code-AST rewriter for a specific issue I wanted to clean up in bulk across a huge code base. Using the Roslyn compiler SDK is a bit fiddly, but it spat out a working tool for me in under an hour. (This is not something you can solve with a script full of regex, it needed a proper parser to handle commented-out blocks and the like.)

                                                                                                • MangoToupe 1 day ago
                                                                                                  Interesting. Do you have stronger evidence to support your claim? A sample size of one is pretty unconvincing.
                                                                                                  • zozbot234 1 day ago
                                                                                                    Wait, what are you saying? These have nothing to do with the Linux kernel whatsoever, they are "kernels" in the GPU programming sense. Did you just hallucinate this whole comment or what?
                                                                                                    • thorum 1 day ago
                                                                                                      Sorry, I added links! Just a week ago someone built a system that used o3 to find novel zero days in the Linux kernel’s SMB implementation.
                                                                                                      • stefan_ 1 day ago
                                                                                                        Theres zero days in obscure parts of the kernel nobody uses every other day. (It also of course found 100 other things that were not zero days or vulnerabilities, yet professed they were, which is why this trash even on Gemini 9000 Pro keeps spamming security mails)
                                                                                                      • None4U 1 day ago
                                                                                                        There was a post on HN a bit ago from someone who used o3 to find a vulnerability in the Linux kernel's SMB server, which this person is just saying should've been tried earlier and probably recently became possible
                                                                                                    • ekelsen 1 day ago
                                                                                                      "the reference code is in the default FP32, and given a tolerance threshold (1e-02)"

                                                                                                      that's a huge tolerance and allows them to use fp16 operations to replace the "fp32" kernel.

                                                                                                      • unignorant 1 day ago
                                                                                                        yeah, it seems likely the underlying task here (one reasoning step away) was: replace as many fp32 operations as possible in this kernel with fp16. i'm not sure exactly how challenging a port like that is, but intuitively seems a bit less impressive

                                                                                                        maybe this intuition is wrong but would be great for the work to address it explicitly if so!

                                                                                                      • beyonddream 1 day ago
                                                                                                        Why do you think it is a huge tolerance ? (Just curious since it is not clear to me if that will lead to too much of reduction in numerical accuracy compared to the speedup)
                                                                                                        • creato 15 hours ago
                                                                                                          The point is, this amount of error is huge for fp32, but may be expected for fp16. But then why compare to fp32 performance baselines? An algorithm that gives you the accuracy of fp16 should be compared to an fp16 baseline, and this may not be (it probably is not) a speedup at all, it's likely much slower.
                                                                                                        • constantcrying 1 day ago
                                                                                                          This means the results are useless. Did they even check the relative error at all?

                                                                                                          Replacing float32 operations with float16 is also pointless. There is nothing to be gained by doing this, as it removes the actual accuracy advantage of float32s, which would the single most important reason to use that version of the algorithm.

                                                                                                          • threeducks 1 day ago
                                                                                                            I ran their matrix multiplication code from GitHub (https://github.com/ScalingIntelligence/good-kernels/blob/mai...) and got a mean squared error of approximately 0.056 for two 4096x4096 matrices containing random values between 0 and 1.

                                                                                                            I think this error is large enough that referring to it as FP32 is misleading.

                                                                                                            Also, the performance gains do not translate to my RTX 3060M GPU (3.8 GFLOPS vs PyTorch's 5.3), presumably because it lacks the optimized hardware for half precision.

                                                                                                            But on the plus side, the single file was very easy to adapt and the code is quite readable. I have seen much uglier kernels.

                                                                                                            • saagarjha 9 hours ago
                                                                                                              That's an Ampere chip IIRC so it should have tensor cores
                                                                                                        • userbinator 1 day ago
                                                                                                          Am I the only one who was enticed into this article by thinking they had AI generate an OS kernel?
                                                                                                          • dgfitz 1 day ago
                                                                                                            Nope, I was as well.
                                                                                                          • vessenes 1 day ago
                                                                                                            By far the most interesting part (after the 400% speed up in some cases) is the methodology: rather than hill climb on operations, they forced a language reasoning step between iterations to encourage diversity of search. This seems to have worked. Very very interesting.
                                                                                                            • lucidrains 1 day ago
                                                                                                              oh wow, I was looking for use of islands or map-elites that I missed this.. thought it was the blandest mimetic evolution possible
                                                                                                              • vessenes 1 day ago
                                                                                                                Just anecdotally I feel like hill climbing on operations is just so slow; I’m not saying it doesn’t work, but it always feels one step away from brute force search. I really like the idea of just throwing stuff at the LLM and giving it access to old strong variants in context.
                                                                                                                • 1 day ago
                                                                                                                  • 1 day ago
                                                                                                              • FL33TW00D 1 day ago
                                                                                                                Tried a replication here. The LayerNorm kernel is not numerically stable so cannot be counted as valid. They only test with zero mean and unit std, so the catastrophic cancellation doesn't show up until after.

                                                                                                                EDIT: looks like they've since generated another one that is numerically stable! great work

                                                                                                                • t-vi 3 hours ago
                                                                                                                  Note that PyTorch's kernels are somewhat generic in shape. It has always been relatively easy to get speedups by specializing the shape, e.g. Apache TVM had that (back before it was "Apache" even).
                                                                                                                  • bgwalter 1 day ago
                                                                                                                    > They are performing close to or in some cases even beating the standard expert-optimized production kernels shipped in PyTorch.

                                                                                                                    The PyTorch code base is NOT written by performance experts in any way. This is the wrong base line. Nothing about that code base is clean or hand optimized .

                                                                                                                    The "AI" generation methodology seems to give many instructions and even descends into instruction trees, manually throwing away results etc. So it requires, as usual, extreme guidance.

                                                                                                                    • poltomo 1 day ago
                                                                                                                      Beating pytorch and tensorflow kernels has been easy to do with ml compilers since ~2018. You typically train and evaluate your model in one of these frameworks then hand off the computation graph to a compiler like Apache TVM or your hardware vendor’s proprietary one. They should test their kernels against those kernels.

                                                                                                                      ML guided heuristic search over compute schedules is as old as 2013 (Halide for image processing)

                                                                                                                      • Workaccount2 1 day ago
                                                                                                                        Very fascinating result, and it seems they wrote this blog post out of pure excitement to share their findings, and maybe to have someone throw cold water on it before publishing, ha.

                                                                                                                        Who knows if this is the actual fabled path of "self improvement", but results like this are what we expect to find on such a path.

                                                                                                                        • suddenlybananas 1 day ago
                                                                                                                          > Who knows if this is the actual fabled path of "self improvement"

                                                                                                                          Seems doubtful as this works only on an extremely well-defined evaluation function.

                                                                                                                          • observationist 1 day ago
                                                                                                                            Each time you define another task well enough for the system to work, you generalize the system just a little bit - repeat enough times and you can start to expand, develop taxonomies of functions, precisely define function spaces and metrics for improvement. This might not be a bootstrap for recursive self improvement generally, but it could definitely inform the theory or design of a system that does bootstrap rsi.
                                                                                                                            • suddenlybananas 1 day ago
                                                                                                                              That's an entirely different idea that may or may not work. This is not evidence of that.
                                                                                                                            • EMIRELADERO 1 day ago
                                                                                                                              That may be true, but this is the first example I've seen where the concept is successfully implemented in a noticeable way.

                                                                                                                              It's just like image generation: the first iteration is the worst it will ever be.

                                                                                                                          • yahoozoo 1 day ago
                                                                                                                            Very cool. They used o3 and Gemini 2.5 Pro but unfortunately they don’t mention which one produced the better kernels.
                                                                                                                            • brrrrrm 1 day ago
                                                                                                                              what's going to be interesting is to see the large space of fused kernels being tackled by AI generated code. that might include gemm + relu + gemm + a norm of some kind - which would be annoyingly exhaustive to 1. sweep with a tuner and 2. handwrite as a human
                                                                                                                              • AtlasBarfed 1 day ago
                                                                                                                                Uh, what is a "kernel" in the sense of AI? Because it sure looks like this isn't an OS kernel.
                                                                                                                            • klingenm 1 day ago
                                                                                                                              This sounds more like using AI (llm) as one small step, where the randomness in the output is used to implement a Genetic Algorithm, than being "AI-generated" (admittedly technically correct).

                                                                                                                              (Edit, typo)

                                                                                                                              • adityamwagh 1 day ago
                                                                                                                                Sometimes I think of LLMs as kind of a hive mind. It’s trained on thought processes of so many humans. I think that’s why it’s able to do these kinds of things given the fact that it has so much information and context compressed in weights.
                                                                                                                                • MangoToupe 1 day ago
                                                                                                                                  The market itself is also kind of a hive-mind metaphor. Worth thinking about.
                                                                                                                                  • suddenlybananas 1 day ago
                                                                                                                                    Maybe we could replace it with a central planning now that we can distill information.
                                                                                                                                    • MangoToupe 1 day ago
                                                                                                                                      Whoops you just did a communism
                                                                                                                                • Mathnerd314 17 hours ago
                                                                                                                                  > we didn't mean to publish yet

                                                                                                                                  I was thinking this was about leaking the kernels or something, but no, they are "publishing" them in the sense of putting out the blog post - they just mean they are skipping the peer review process and not doing a formal paper.

                                                                                                                                  • david-gpu 1 day ago
                                                                                                                                    Disclaimer: This used to be my bread and butter, but I'm really rusty after five years of not working on this sort of stuff.

                                                                                                                                    That said, after quickly skimming the example AI-generated kernel I am not seeing anything novel there. While working at nVidia I did see a handful of techniques that, frankly, blew my mind.

                                                                                                                                    Thus, I wonder what makes this AI-generated kernel faster than the standard pyTorch kernel, which I presume is simply delegating all the heavy lifting onto cuDNN. My guess, and it's just a guess, is that they are comparing the fastest AI-generated kernel they produced for a very particular set of parameters against whatever kernel cuDNN is picking for that same scenario, and perhaps the subsystem inside cuDNN that picks which kernel to execute out of the very large database it manages chose a suboptimal candidate. Researchers tend to completely ignore this issue and assume that cuDNN is always able to choose the very best kernel in every possible scenario, something that is just not realistic.

                                                                                                                                    Maybe there is something else going on, but these sort of "we have beaten this heavily optimized proprietary library" always seem to miss this very important point.

                                                                                                                                    Kind regards to any NVidia insiders who may read this. You guys are the brightest people I've ever met.

                                                                                                                                    • zahlman 1 day ago
                                                                                                                                      > Thus, I wonder what makes this AI-generated kernel faster than the standard pyTorch kernel

                                                                                                                                      All of this stuff is way outside my wheelhouse, but maybe "the standard pyTorch kernel" is just a low bar? (https://news.ycombinator.com/item?id=44144346)

                                                                                                                                      • david-gpu 19 hours ago
                                                                                                                                        Thanks for the link. I did have a quick look at the github repo yesterday, trying to find where this "default pytorch implementation" lives, but it wasn't immediately apparent due to the layers of abstraction in the code.

                                                                                                                                        There's little doubt in my mind that the authors of the blog post went after the largest performance delta between their best AI-generated code and the default pytorch implementation, without looking into real-world nuances like "picking a good kernel out of a zillion options" or "production-quality output accuracy". It's cool that this sort of thing is being researched, but the results need to be taken with a grain of salt. Maybe I'm too jaded.

                                                                                                                                    • MangoToupe 1 day ago
                                                                                                                                      > Our results are benchmarked on an Nvidia L40S

                                                                                                                                      At the very least they could have used consumer hardware. I don't even know how to parse that model it's so consumer-alien.

                                                                                                                                    • JSR_FDED 1 day ago
                                                                                                                                      Could this be used to create kernels for OpenCL, ROCm, etc?
                                                                                                                                      • reliabilityguy 1 day ago
                                                                                                                                        Is my understanding correct that they assumed a fixed size of the input?

                                                                                                                                        If so, why is it surprising that generic implementations in PyTorch are worse?

                                                                                                                                        • GaggiX 1 day ago
                                                                                                                                          Pytorch uses different kernels depending on the input size. There is a reason why it's so massive to download.
                                                                                                                                          • reliabilityguy 1 day ago
                                                                                                                                            Sure, some degree of customization is expected. However, I doubt that PyTorch implements every input size separately.
                                                                                                                                            • saagarjha 9 hours ago
                                                                                                                                              Generally tiling to a handful of sizes gets you pretty close to "specialized to this size" performance.
                                                                                                                                        • constantcrying 1 day ago
                                                                                                                                          >and test for correctness by checking the numerical equality of the two outputs over many random inputs.

                                                                                                                                          This is fundamentally different to how any human would approach this problem. And also different to how some recent advances in this area were made, where AI actually came up with superior and correct algorithms.

                                                                                                                                          This approach also seems quite unfortunate and makes many of theses results somewhat doubtful.

                                                                                                                                          • gotoeleven 1 day ago
                                                                                                                                            How else would you do the verification?
                                                                                                                                            • constantcrying 1 day ago
                                                                                                                                              See: https://www.nature.com/articles/s41586-022-05172-4

                                                                                                                                              IIRC there was another paper recently, with similar methodology about computing xAx. These papers produce algorithms which aren't empirically correct, but provably correct. They do this by operating on a graph data structure, which describes the algorithm and then verifying the algebraic equality to the correct result.

                                                                                                                                              There is a substantial difference here. And I think utilizing algorithms which only are empirically correct can be dangerous.

                                                                                                                                          • terhechte 1 day ago
                                                                                                                                            [flagged]