Unofficial Hacker News companion — get notified on comment replies, and more.

Nvdriver is a clean-room, open-source Rust Linux kernel driver for Nvidia GPUs (opens external site)

908 points by rreyes1979 1 day ago | github.com | 451 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (162)

  1. Having worked briefly on GPU drivers (amd ex-ati) I'm curious how this can be done. There were myriad details inside that code that related directly to particular controls deep in the basics (micro cache enables, chicken bits, N-1 toggles, memory access radices, etc). Many of them were set once, not dynamically. And clearly not documented anywhere outside HQ. And almost none had a visible effect...until a long chain of operations caused a fantastic crash, or trivial one. Experienced people spent months with the manual, fancy tooling, and the hdl and the designers downstairs to get it shippable and then time was spent after shipping.

    I would say you can scan 100s of games to see how they operate the hw...but many games have individual engs assigned to work w game devs to hash out configs down long trees of operations... this feels like learning Chinese with almost no feedback. There are so many parts/corners of the internals that get manipulated.

    I could see moving from "one clone of every apps' code" to "common parts distilled," but what are the chances it could be reliable with code it hasn't been trained on that uses a novel feature?

    Replies (20)
    1. For modern drivers, I believe all those fiddly bits have essentially been moved into the firmware. Nvidia is packing them all into the GSP. That remains an impenetrable binary blob.
      Replies (2)
      1. But at least in theory this claims to support pre-GSP cards (maxwell, pascal)
        Replies (1)
        1. I've not worked as a video card firmware writer so I can't be certain. Those pre GSP cards did still have firmware, it just did a lot less. It'd not surprise me to learn that it's still handling a lot of the fiddly bits OP mentioned.

          Traditionally before the GSP, a lot of tweaks and game bug fixes were packed into the driver itself. Those have now been moved into the GSP.

          Replies (1)
          1. The GSP (or any card firmware in fact) does not have game-specific hacks. Those live in the UMD itself, the architecture depends on the graphics API but things like shader replacement based on app hash+shader hash, specific settings by default (on nvidia you can view some of the keys with that utility I forgot the name of) and so on
            Replies (1)
            1. > on nvidia you can view some of the keys with that utility I forgot the name of

              NVIDIA Profile Inspector: https://github.com/Orbmu2k/nvidiaProfileInspector

      2. yeah that needs to get penetrated too lol
    2. Considering https://github.com/QuixiAI/nvdriver/blob/master/AGENTS.md specifically mentions decompiling the proprietary driver I assume that was used as a reference for stuff like that.

      And makes me wonder what the author thinks "clean room" means.

      Replies (10)
      1. They vacuumed before firing up claude code.
        Replies (1)
        1. good one
      2. probably 'clean room agents laundering': one agent reverse engineered and wrote a spec then other agent worked on implementation based on spec. Which is how it may work in theory but unlikely anyone really can believe that is no leak of original in that spec.
      3. The original story behind the "clean room" decompilation that made affordable PCs possible involved having one person decompile/decode instructions, describe what it does, and having another re-implement the code.

        An AI clean room decompilation could be one AI agent decompiling the code, turning methods into specifications, and feeding that to another agent to write the "clean" code.

        This isn't that, though. This is straight "turn disassembly into Rust". That might be a copyright violation? Though, AI generated content is in a weird legal state at the moment; I don't think you can copyright a single line of code in this repository, but I'm also not sure if this is even illegal anymore. After all, AI companies got away with stealing billions of lines of GPL code, it'd be weird for licenses to matter now.

        Replies (3)
        1. Even the first option is sus, since the recent navier-stokes-and-friends scenarios strongly suggest that the models directly learn from prompting in a way that breaks the clean-room premises.
          Replies (1)
          1. How does it strongly suggest that? Mathematicians were on the brink of solving NS, GRH, VP≠VNP, the complexity of matrix multiplication, showing factoring is subexponential, and myriad other problems all within a couple months of each other? And the AI companies took their work and scooped them all? People still believe this?
            Replies (1)
            1. It is explicitly acknowledged by the frontier labs that they train on your promptings.

              And it is demonstrable that an LLM will one day say "I never thought of that" and months later will intuitively know it.

              And there have been multiple cases where research thrown through an LLM get scooped by the AI lab, not just navier-stokes.

              I do not think there is any reasonable doubt that just about every lab uses chat transcripts to train or finetune.

              Continue this thread (1 replies) →

        2. And then this repo goes in a training set that another chatbot reproduces. Why is copyright only a concern for tech companies and not the literally everyone else on the planet that they’ve ripped off? I’d love for nvidia to litigate this and set a legal precedent that lights the entire AI theft business model on fire. How brave are the creators of the brave new world?
          Replies (1)
          1. I'd even see this as the point of this repo. If the owners go through with it.
        3. The original "clean room" didn't involve any decompiling, IIRC, only describing directly observable behavior in excruciating detail.
          Replies (2)
          1. My friendly AI fooled me if so, it told me that is 100% ok to observer and re-implement, its the decompile which is problematic.
            Replies (2)
            1. I think that just shows you should not rely on that "friendly AI" for legal questions :p
            2. What did you ask it?

              If what you are trying to do is make your own program that is a clone (partial or full) of some other program and it is just you, then decompilation is risky because if you write code that is similar to the decompiled code it can be hard to defend against a copyright infringement claim.

              The burden of proof will be on them to show you copied, but they only need a "preponderance of the evidence" to meet that burden. That's usually done by showing that the alleged infringer had access to the copyrighted work and made a work that is substantially similar.

              If you don't decompile and just implement based on the behavior you observe in their program you are much safer.

              If you have more than one person involved and you split the work in a proper clean room fashion, then decompilation can be fine. The people that decompile just use the decompilation to figure out what the program does, write a spec for that behavior, and pass just that spec to the people who implement. Ideally the people who implement should not even have the binary of the original program.

              Since the implementers have no access to the copyrighted work they cannot have copied it. If the owners of the original program want to claim copyright infringement they have to go after the people who wrote the spec and that usually will be very difficult since the spec should just be documenting behavior.

          2. The source code to the IBM BIOS was printed in the PC technical reference manual. The "dirty" team read the manual and the source and produced detailed specifications, then a programmer implemented a new BIOS based on the specifications.
      4. > "And makes me wonder what the author thinks "clean room" means."

        Either the whole definition of clean-room changed or he just cleaned his room before release... /s

        This Markdown is quite a gem. It describes "We are building a clean-room Rust driver" in the title, with Step #1 asking to decompile the driver and "Understand the subsystem's full call graph, object ownership, state machines, and lock hierarchy before writing any code."...

        It literally asks to reverse-engineer the original implementation and then rewrite it with "new code".

        I doubt this can be used to circumvent any IP-claim...

        Replies (2)
        1. Author forgot to get a billion dollar valuation before shrugging off IP law
        2. people dilute phrases that have high impact for clout. Remember when "air gapped" actually meant something different than "I configured a switch and router like you normally would"?
      5. im here to register my dismay at the use of "clean room" too. vague nonsense
      6. Sure, I think it's clean room since I don't have the source code, I am decompiling the source and analyzing and reimplementing it.

        If you have a different view of clean room that's cool, you can make your own clean room reimplementation, and rightfully claim it's better than mine.

        Replies (4)
        1. > Sure, I think it's clean room since I don't have the source code, I am decompiling the source and analyzing and reimplementing it.

          That's the opposite of what clean room means, not just a "different view".

        2. That is definitionally not clean-room, by any historically-understood meaning of the term. There might be multiple definitions of the subtleties of "clean-room", but its stable core is "not one person decompiling + reimplementing".
        3. FWIW, reversing is considered acceptable by ReactOS contribution terms, so you're probably fine-ish.

          It's interesting because it's the largest relevant effort that I'm aware of.

          https://reactos.org/intellectual-property-guideline/

          https://reactos.org/project-news/reactos-and-tinykrnl-projec...

          Replies (2)
          1. Can you point to the wording that accepts this?

            It surprised me, so I checked. I understood the opposite. From your first link:

            …contributors often need to conduct research to understand the internal architecture of the NT™ operating system. In such cases, the project follows the GNU guidelines for referencing non-free code. This applies both to usage of reverse engineering and exposure to proprietary code such as in the Windows Research Kernel.

            The GNU guidelines don’t seem to cover reverse engineering specifically, but they do say:

            Don’t in any circumstances refer to Unix source code for or during your work on GNU! (Or to any other proprietary programs.) If you have a vague recollection of the internals of a Unix program, this does not absolutely mean you can’t write an imitation of it, but do try to organize the imitation internally along different lines, because this is likely to make the details of the Unix version irrelevant and dissimilar to your results.

            And from your second link:

            …due to copyright laws and other law-related stuff, ReactOS (which aims at commercial usage too) can not directly utilize methods of development like dirty reverse engineering, and thus ReactOS can not share all code with the TinyKRNL project.

            Replies (1)
            1. You're probably right and I misunderstood it. Wikipedia has a decent explanation:

              https://en.wikipedia.org/wiki/Chinese_wall#Reverse_engineeri...

              https://en.wikipedia.org/wiki/ReactOS#:~:text=In%20a%20state...

              So it looks like you're fine as long as one person reverses and other writes code. No idea how it applies when one clanker reverses and other writes, with a person as a middle man.

          2. This is a bit of an aside, but have ReactOS devs ever tried to build an NT based OS without the Win32 compat layer?
        4. I'm no expert, but I think most people would call that "reverse engineered", not "clean room". And BTW, I think no need to get defensive. Up this thread I have not seem criticisms of the code, just questioning if it's actually clean-room, because that matters for whether someone is gonna have a better chance of taking down the repository, how likely is gonna end up in distributions, and the like.
      7. I see "REA" - I know that the person doing RE is not a professional, I'm sorry, REA - is a bundle of semi-random tools glued with slop'd guidelines. This reconstruction needed to be gated with byte-identical verification done with the original toolchain (it's easy to fingerprint it and its flags). And only when you have it verified in the original language (C/C++? whatever nvidia used), did multi-pass review with names reconstruction, covered with tests and so on -> you could port it to Rust. Right now is a ticking bomb (just bc it speaks with hw low-level), let's be honest.
      8. Nobody actually knows. Clean room is a bit of a BS term. You can take a piece of hardware/software, poke, prod and disassemble it, and write a detailed spec.

        You are 'dirty' at this point, but then somebody else can come along and produce a 'clean' implementation of the spec.

        This sounds like an LLM skill at this point tbh, so you just copy the .md file into the repo, and then 'do the thing, make no mistakes'

      9. > makes me wonder what the author thinks "clean room" means.

        "My parents refused to buy me any more Clod tokens unless I cleaned my room."

      10. I call this development model "clean room theater". No judgement on my part but LLMs make decompiling so easy.
    3. >> And clearly not documented anywhere outside HQ.

      One user with the email AHuang234@protonmail.com leaked the internal docs

      Replies (4)
      1. ">> And clearly not documented anywhere outside HQ. One user with the email AHuang234@protonmail.com leaked the internal docs"

        One day there will be fines for unpublished/incomplete datasheets?

        Replies (2)
        1. Jeez, I hope not. That sounds very authoritarian.
          Replies (5)
          1. And yet necessary to ensure adversarial interoperability
            Replies (1)
            1. Adversarial interoperability is adversarial. If you want it, go and decompile an Nvidia driver.

              Continue this thread (1 replies) →

          2. This is exactly the use case for gov regulation. Bad regulations protect monopolies and oligopolies, but forced openness, interoperability, and transparency are a simple easy win. Compliance isn't hard, just release your internal documentation.
            Replies (2)
            1. Part of the problem is that often isn't any internal documentation: it's literally a case of talking to whoever designed it and tracing through that actualy implementation.

              Continue this thread (3 replies) →

          3. >That sounds very authoritarian.

            so are enforced traffic laws. Unfortunately without them the morning drive would have more in common with gladiatorial combat than commuting.

            Replies (1)
            1. That's not at all what authoritarian means.

              Continue this thread (1 replies) →

          4. The definition of authoritarian is not "there exists a rule".

            Authoritarian is used to describe systems that limit individual freedom in favor of a strong limited set of authority.

            A rule that says a corporation, that is a legal entity that limits liability for actions and ownership, must release enough information for its products to allow people to do as they please with them, seems to maximize individual freedom at a small cost to the corporate authority.

            Frankly it seems a good tradeoff to me - if you want to sell something while limiting your liability for what you sell, I'm fine with making that part of the requirements for limited liability.

            Although i do think that people willing to take on full liability for their products and actions can still withold the information.

          5. You can do this with soft power.

            Decare that the government will only buy tech with publicly available data sheets.

            People are then free to do what they want, but going counter to openness would cost them a considerable market.

        2. I'd prefer closed hardware sometimes for commercial reasons than the alternative of there being fines for publishing datasheets because of government regulation.
      2. So not clean room at all then
        Replies (3)
        1. Unless it uses nvidia code or trade secrets, it's still clean room

          A document being leaked (widely) by a third party renders all of its trade secrets contents no longer trade secrets, by definition (yes, even if the doc was obtained through espionage).

          The only person nvidia could go after for this is the person who leaked the doc, not anyone who uses the doc. This is why protecting trade secrets is so important: the only remedy is suing the discloser if they had no authorization to disclose. This is specifically the reason ndas exist: to provide for recourse if trade secrets are disclosed publicly. At no point do you obtain the right to sue someone who wasn't bound by trade secrets law.

          So this is still a clean room implementation.

          Replies (1)
          1. The leaked document is almost certainly subject to copyright, anyone making copies of it is certainly liable for breach to copyright.
            Replies (4)
            1. True, but there are limits to copyright protection. You can read the document and write your own version easy enough. Most of what is contains is functional facts which are not subject to copyright (only patents)

              Continue this thread (1 replies) →

            2. so you could be held liable for depriving nvidia of the income they could have charged for this artful document, if you make copies of it?
            3. >The leaked document is almost certainly subject to copyright, anyone making copies of it is certainly liable for breach to copyright.

              Seems like it effectively doesn't matter in this case? Nvidia would struggle to prove any significant damages from a copyright perspective given it's not something they sell. But that's a detail really, even the simple statutory max of $150k/copy (in this case just one copy), which would be ruinous for the classic case of someone downloading tons of songs or something, might as well be rounding error for a open source set of Nvidia drivers. I doubt they'd even bother. And the entire point of clean room reverse engineering is to start with copyrighted material and then break the chain ending up with material copyrighted by the RE team instead of the source copyright holder. Even if the original source is an act of infringement of one kind or another it doesn't change that process. A factual spec sheet is still completely unprotected.

              The real question is software patents. While patents can be challenged and invalidated, nothing bypasses them either.

            4. Here’s the plan to minimize any legal issues:

              1. Upload it to a pirate book site

              2. Nvidia downloads it and seeds it to you

              3. Train an AI model with it

              4. The AI model writes a new document for you

        2. I'm pretty sure this is a joke, not a serious comment: https://en.wikipedia.org/wiki/Alice_Huang_(executive)#Relati...
        3. It was a joke about Alice Huang.
      3. lol, this made me spit out my coffee!

        (why would someone use proton mail, then proceed to use such an identifiable handle?)

        Replies (4)
        1. It's clearly an identity, but surely not the identity of the leaker. I assume it's a reference to Alice Huang, but who knows, Huang is an incredibly common name.
          Replies (1)
          1. It also sounds like "One", hence 2, 3, 4...
        2. This is a joke email address in a nod to Alice Huang[1] [1] https://en.wikipedia.org/wiki/Alice_Huang_(executive)#Relati...
          Replies (1)
          1. Yeah, I got the joke, which is why I spit out my coffee.
        3. Made my day. Thank you.
        4. Brilliant -- laughed out loud myself .. amazed out how many HN folks didn't get the joke
      4. This reminds me of the hilarious comments you used to see on Slashdot back in the day. Bravo! :D
    4. There was already a big leak of proprietary NVIDIA driver source a few years ago. Overall there’s probably lots of information out there.
      Replies (2)
      1. Leaks would preclude a “clean room” implementation — perhaps the authors are hoping that no one calls their bluff?
        Replies (7)
        1. A lot of these “clones” use the word clean room incorrectly as a hopes of avoiding any takedowns or being locked out by the LlM providers
          Replies (1)
          1. Also LLM-generated READMEs will automatically insert the word "clean room" to a rewrite even if you explicitly tell it to rewrite based on the source. I tried to rewrite FFmpeg and literally included it as a Git submodule in the repo and Claude still insisted on it being "clean room".
            Replies (1)
            1. I mean, you did sweep the floor recently, right?

              Continue this thread (1 replies) →

        2. Does that mean every driver ever written with AI from now on is using proprietary material from 100s of companies?
          Replies (4)
          1. > Does that mean every driver ever written with AI from now on is using proprietary material from 100s of companies?

            Nvidia does not want that sort of precedence: then it means that every AI-produced software is "contaminated" with GPL, proprietary licenses, etc.

            Replies (1)
            1. They'll find a way to make it apply to their stuff but not their enemies.
          2. Surely it's been that way since the beginning, proprietary stuff would have been vacuumed up in the training data.
            Replies (1)
            1. It’s wild to me that some people are only just now going “oh wait hold on are my agents using unlawfully gathered information?”
          3. Probably, yes. All software generated by an LLM that was trained on proprietary or incompatibly-copyrighted works is tainted.
            Replies (2)
            1. In the same sense that it is GPL licensed. And BSD licensed. Maybe someone needs to write a giant file that does the BSD-style acknowledgement for every project.

              Realistically, though, large/politically connected companies have gone all-in on this AI stuff so it will be found, somehow, to not be infringing.

              We will declare matrix multiplications sentient and capable of producing their own creative works before we let those investments get written off, I think.

              Continue this thread (1 replies) →

            2. By that logic it would be enough when you looked once at GPL code to tain your brain forever and all your future output needs to be GPL. That's not how it works.

              Continue this thread (2 replies) →

          4. Yes, obviously (that is, it is obvious that the proprietary material was used). What conclusion do you want to draw from that? It is not immediately copyright infringement.
        3. If AI can get away with training on differently licensed code, why is this any different ?
          Replies (1)
          1. I find the irony in this particular product absoutely hilarious.
        4. They don't as long as one person e.g. documents what various registers do from the leak and another writes the code.
        5. real clean room RE can involve one team inspecting decompilations etc and writing independent documentation, which another team then uses to re-implement it having never seen the starting material. people try to replicate this with agents but like lol
          Replies (1)
          1. Yeah, pretty comical.
        6. It depends.

          As far as copyright goes, it shouldn't really matter if a leak was involved.

          The potential problem is trade secrets. A trade secret doesn't lose its trade secret status just because it got leaked. It can eventually lose it if is spreads too widely. If you do the clean room stuff before that you could be liable under trade secret law.

          LLMs are probably going to make it much harder for companies to take down leaks before they spread too far. As a major LLM told me, "LLMs act as a massive information-laundering and acceleration engine that shrinks a company's containment window from weeks to hours".

          In the specific case of trade secrets involving how to operate hardware the trade secret claims start out kind of weak because under US trade secret law something that can be readily figured out by legal means is not a trade secret. If people could figure it out by buying your product on the open market and then using bus sniffing and decompiling to figure out how to operate the hardware then you probably do not have a trade secret.

          Replies (2)
          1. I’m not too sure about the law , but it would strike me that keeping a trade secret secret is the job of the company that holds the rights? Why would it be protected by govts after it’s released into the wild?

            They may be spiteful… but these days I can’t blame folks for stuff like this … I doubt a jury woul

          2. > A trade secret doesn't lose its trade secret status just because it got leaked.

            IANAL, but I did take a (non-law school) IP law class, and generally the loss of secrecy via any means results in the loss of the trade secret. In other words, a trade public-knowledge is not protected. You can prosecute the person(s) who leaked it, but not people who use it after it has become public. If you want protected public knowledge, you file a patent. (This led to a discussion on the choice of trade secret vs patent, depending on how long the knowledge is expected to be useful for, patentability, cost of patenting, etc.)

            I also don't think that decompilability is any protection against violating a trade secret, since the test is whether the company took reasonable actions to protect the secret. Since the driver must be used, releasing a binary-only driver seems like it might be a reasonable level of secrecy. (But might not, you'd have to look at case law.)

            See https://cyber.harvard.edu/openlaw/DVD/research/EFF_General_8.... (My class was not at Harvard, this is just the first reference I found.)

            Replies (1)
            1. It depends on how big the loss of secrecy is. If it is a small loss of secrecy the trade secret might survive. The Uniform Trade Secrets Act (UTSA), which has been adopted in the US by every state except New York, along with DC, Puerto Rico, and the U.S. Virgin Islands, defines "misappropriation" as (I'm going to insert underscores in front of some lines to represent indentation):

              > (i) acquisition of a trade secret of another by a person who knows or has reason to know that the trade secret was acquired by improper means; or

              > (ii) disclosure or use of a trade secret of another without express or implied consent by a person who

              > ___(A) used improper means to acquire knowledge of the trade secret; or

              > ___(B) at the time of disclosure or use, knew or had reason to know that his knowledge of the trade secret was

              > ______(I) derived from or through a person who had utilized improper means to acquire it;

              > ______(II) acquired under circumstances giving rise to a duty to maintain its secrecy or limit its use; or

              > ______(III) derived from or through a person who owed a duty to the person seeking relief to maintain its secrecy or limit its use; or

              > ___(C) before a material change of his [or her] position, knew or had reason to know that it was a trade secret and that knowledge of it had been acquired by accident or mistake.

              If the owner can get the leaked or stolen information taken down while everybody who has acquired a copy falls under (ii)(B)(I) those people cannot legally use or further distribute the secret. If that succeeds in keeping the secret confined to such people and those people fear the legal consequences of going ahead and spreading it anyway, the trade secret survives.

              If it spreads farther it can be lost. According to Wikipedia, the comments on the USTA's definition of a trade secret say "A trade secret ceases to exist when it is common knowledge within the community in which it is profitable. This means that the secret does not need to be known by the general public, but only throughout the industry that stands to profit from it". (A quick search failed to find the comments to the USTA and Wikipedia doesn't give a link so I'm just assuming they are right).

              The legal consequences for the early spreaders, the ones covered by (ii)(B)(I), can be pretty scary. Suppose they keep spreading it, the trade secret is lost. The damages could include the market value of the trade secret (what a buyer would have paid for exclusive rights to the secret), or the R&D costs that the owner incurred in creating the secret, or the profits the owner loses due to competitors now using the former secret.

              It can be hard to pin those on intermediate links in the chain of spreading, but even a small risk of that can make you think twice. If it happens to your post of the secret on some forum that rapidly goes viral then you can be royally screwed. You could end up in a situation where when the secret is public enough that the trade secret is extinguished the majority of copies out there came from your post.

              You might think in that case you can argue that the upstream spreaders you got it from are just as responsible so at least any liability would be shared.

              The frightening thing you run into there is "joint and several liability", which many states use. Briefly, what that says is that if multiple wrongdoers contribute to an individual harm the plaintiff doesn't have to come after each separately for their contribution. The plaintiff can sue any of them for the FULL amount of damages. If the plaintiff wins that defendant pays all the damages, and can then turn around and sue the other wrongdoers for the amounts they contributed.

        7. No, a leak doesn't preclude a "clean room" implementation, you just make sure that the implementers don't look at the leaked info. Companies that want to do a safe clean room implementation often involve lawyers to restrict who gets to look at what; the most paranoid version was to have two teams, one of which analyzes the product and writes reports, which go through legal, and one of which does the work without looking at the product (or any leaked specs).

          Although LLMs complicate that: if leaked trade secrets make it into the training data of frontier models, then the code generators "know" the secrets. But that's already a huge issue: LLMs are a great way to launder away copyright protection.

          Replies (2)
          1. > LLMs are a great way to launder away copyright protection.

            I think you meant: violate copyright protection.

            Replies (1)
            1. — with no consequences
          2. Before, two teams, one to analyze and document, other to implement. Now, two AI agents, one to analyze and document, other to implement. Maybe a third agent to act as intermediary and lawyer.

            And if that is illegal in your jurisdiction, find another jurisdiction. With governments around the world being pushed to make training AI on data without license or permission, you will probably find one to meet your needs.

      2. There is almost no delta between the proprietary and open kernel driver. All the interesting bits are in the GSP firmware blob.
    5. > scan 100s of games

      I see zero indication in the docs that the authors care about games, or indeed video output at all. The target use cases are headless: LLM inference and crypto mining.

      Replies (4)
      1. One of the two authors work for OpenRouter. So you are probably right
      2. This, they don't care at all about games, they want to run AI models on them. What I'm curious about is if that is possible not knowing what the parts of the driver that enable video processing "do". Lots of questions about that.

        Not to mentioned if you have a vibe coded engine for your running your LLM is that uncertainty on top of uncertainty in terms of the work product? Anyone have a good paper on the transitive properties of vibe coded AI's accuracy vs "less" vibe coded AI?

        Replies (2)
        1. Presumably they could just run a series of deterministic workloads on the proprietary driver and on their new driver, comparing outputs? (Which should be bit-for-bit identical)
        2. This is also only the 'kernel' driver, not the userspace driver, where a majority of GPU poking actually happens. I don't have a rig to test this up rn, but it would not surprise me if this works fine with the Mesa-NVK driver.

          For some variant value of 'work', of course, but current mesa does ship a nvidia userspace that does some things all the way from maxwell to blackwell.

      3. I wonder if anything uses LLM inference as PoW for crypto mining.
        Replies (1)
        1. No. Proof of Work that is useful for other applications damages the security model of cryptocurrency. The entire idea is to make it infeasible for an adversary to rent enough PoW to spawn camp the chain.
          Replies (2)
          1. Yet this happened again and again with ASICS.
          2. Not exactly imo

            Useful PoW has significant asymmetry between finding a solution and verifying a solution.

            Verifying a hash is cheap. Finding a hash is expensive.

            There is no asymmetry between generating an LLM response and verifying you generated the LLM response.

      4. Without games you can't reveng the driver. Simple as that.
        Replies (1)
        1. A very strong assertion, any evidence?
    6. Maybe nvidia's cards are slightly more logically setup? The nouveau driver works reasonably well for a lot of older cards as well so it's not like it is completely unknown.

      And let's be honest. AMD has a reputation for their driver being quite bad/incomplete . Your description sounds like even AMD themselves did not really have a good overview of what the engineering department had cooked up either, which kinda matches that reputation.

      Replies (2)
      1. I've got an old laptop with K1100M. This is too old for this nvdriver. Nouveau works well for 2D and probably basic 3D. Anything that requires true 3D fails, eg every HN link to WebGPU games and sites. That's annoying but I can do without it as of course my job is not about 3D graphics. The only major thing that Nouveau cannot do is brightness control. I simulate it with gamma correction, but that works only on X11, not in Wayland.
      2. > AMD has a reputation for their driver being quite bad/incomplete

        The reputation is a decade out of date

        Replies (2)
        1. >The reputation is a decade out of date

          For the open sourced radeon drivers? Yeah lots of things work great now.

          For their own in house proprietary drivers? Lol, Lmao.

        2. My personal experience is different. The open source drivers are a lot better yes. But still I am fighting with random rocm stuff just not working for mysterious reasons quite often.

          On my nvidia machine I have some quirks as well. Which are extra annoying because they wouldn't need to be there if nvidia was as open source friendly as amd.. but mostly it just works.

    7. this is kinda ancient history, but I remember old GeForce cards used to implement the OpenGL state machine, with every command submitted to the GPU matching an OpenGL call, parameters and all.
    8. a lot, but not all of the docs are public: https://nvidia.github.io/open-gpu-doc/

      That and the existing kernel driver is already open source.

      Same docs they use internally. I remember.

    9. That's all in the firmware. This is a copy paste from the open source Nvidia driver.
    10. > learning Chinese with almost no feedback

      Perhaps you should take a read of https://en.wikipedia.org/wiki/Chinese_room which is the thought experiment about AI and true understanding vs regurgitation.

      You can understand the symbols even if you don't understand the meaning.

      "Clean room" is doing a lot of lifting here without any evidence.

      Replies (1)
      1. This is kind of wishy-washy, but I feel like we can say large language models have reverse engineered systems described by natural language, simply by being trained on natural language. To me, I think this can be reasonably declared to be a type of understanding. When I originally heard about the Chinese room thought experiment I felt like it was being presented as though it’s not possible to understand something through symbolic representation. I think this is mistaken and assumes everything has to think the way that a human does. Sure, humans can’t learn Chinese in that fashion. But we only have a handful of slots in our working memory. Not millions or billions like a computer.
    11. I assume it is like those other projects that told the llm to do "clean room".
    12. > chicken bits

      Ok, what are chicken bits?

      Replies (2)
      1. They're bits you set to disable a feature, usually because it's faulty or buggy. Literally 'chickening out'.
      2. When you design new silicon, you add features to the old generation, but just in case you messed up a weird corner case, you add a config bit that disables the new hardware optimization. In other words, if you chicken-out and get scared of the new feature, your firmware/code can just set one bit in an obscure register then the new feature is disabled, and you are guaranteed the same behavior as the old chip.
    13. > chicken bits

      Oh TIL

      > A bit on a chip that can be used to disable one of the features of the chip if it proves faulty or negatively impacts performance

    14. Most likely they just prompted an LLM "port Nvidia driver to rust. make it clean-room"
    15. Not a clean answer but: back in the day Naveen Rao and Nervana Systems beat nVidia at BLAS https://news.ycombinator.com/item?id=20490050

      LLMs today probably greatly accelerate the tedious parts of "reverse-engineering"

    16. > There were myriad details inside that code that related directly to particular controls deep in the basics (micro cache enables, chicken bits, N-1 toggles, memory access radices, etc). Many of them were set once, not dynamically.

      A bit of a tangent, but: do you have any idea why these things get handled in the GPU driver in the first place, rather than the GPU having firmware that does its own bring-up into a useful state before it ever starts letting the CPU talk to it?

      Replies (2)
      1. Isn't that what nvidia is using the GSP for and why (or perhaps rather: how) nvidia has moved to an open source kernel driver?
      2. Not the above author, but I think the trade-offs are managing the tension between what can be tested during the hardware development part of the project and what ends up being the reality of operating in varied hardware and software environments. Add on to that any friction or risk of a secondary update failing (the driver updating the card firmware, for example) when the activity is "setup" that isn't part of the system after start up or driver or hardware initialization, it's a tantalizing prospect to remove a whole class of failures and gain more rapid deployment of fixes, and only paying in driver update/on disk size, for all intents and purposes.
    17. Binary files are no different than sourcecode for LLMs. I had jaw drop moment when I thought I'll attach firmware and ask LLM why it shows certain message on LCD. I told it what CPU was used and got an answer promptly. It even listed some bugs which I then tried on the device and they were indeed happening.

      I am now thinking of telling my LLM to decompile all the blobs in RaspberryPi just because why not.

    18. Perform static analysis and then dynamic analysis; in many ways it's a lot easier than forward engineering drivers since the weird sequencing issues and errata that always come up are already fixed. Stuff like "which chicken bits to set" and "what clock/power domain blows the other one up if you get the ordering wrong" doesn't cause issues, since the instrumented traces and analyzed code already do everything in the right order.

      Usually the way this is done by hand (and reading the source for this driver, it looks like Claude did things about the same way) is:

      * Statically analyze enough of the system to understand how commands (mapped registers, mailboxes, buffers) are sent and structured at the highest level.

      * Write a dynamic analysis tool which can trace the state changes sent to the hardware (ie - dump every register poke, every mailbox, every buffer)

      * Dump enough of the bring-up to be able to do it yourself, even if you don't understand it (ie - these 500 registers need to be set to these values for "normal operation," we have no idea what they are, but we know how to poke them and in what sequence).

      * Use static analysis to try to back out the meaning of each register/buffer and to define structures (ie - "this register has bit x set to y in a function called EnableFooClockDomain, it must be the FOO_CLK_EN bit" or "this structure is allocated in AllocateBigTransferBufferA, the type of this structure is clearly a big_transfer_buffer_a"). If you don't know what the functions are called, name them using context clues (observed logging, where in time said function is called, known values in the inputs, etc.)

      Then you basically rinse and repeat this process using techniques like fuzzing observed inputs->outputs, tracing known constants, and finding context clues from documentation and parallel architectures.

      The Asahi Linux RE process is a good way to understand how this kind of hardware RE worked pre-LLMs (and how LLMs learned to do it); they first constructed a hypervisor (m1n1) for the OS, then instrumented how the OS manipulated the hardware, then fuzzed the inputs to the OS to understand the resultant hardware-state-communication outputs.

      I also doubt this driver will get too far down the game specialization rabbit hole, so they don't need to know quite as much; they seem to be targeting mostly basic display acceleration and GPGPU, so the stack of hacks isn't quite as tall.

    19. If they followed the usual open source conventions, what would happen is they'd write the driver the way they think the hardware ought to work, and if it fails, they'd blame Nvidia and tell the user to complain to the people who made broken hardware.
    20. > but many games have individual engs assigned to work w game devs

      looking at my nvidia experience and all of those release notes I often wonder how much is it devs writing for gpu and how much of it is "gpu" writing for devs.

      every week there's a new driver advertising better performance in a specific game - seems like majority of the driver are custom branches tailored for specific use cases.