by diydsp · 5d ago · 0 comments
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?
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.
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.
GPUs were originally designed to accelerate game rendering, so basically every fixed function unit in the hardware is designed to do something for graphics. Even in modern GPUs, where most shader code runs on a unified vector SIMD[0], there are still special hardware units for texture sampling and rasterization, and they even use special pixel formats and tile layouts that only make sense for graphics. Raytracing is also its own hardware unit that shaders have to submit ray queries into.
A pure compute workload will never touch any of that hardware. Even things that you'd think are compute-only, like the matrix units[1], can be used to run a post-process neural network upscaler for games. That's why Nvidia pushes DLSS so much: otherwise the matrix units would sit idle. So if you're building a reverse-engineered Nvidia driver and NOT running games, your driver is only really going to know how to run compute shaders and not much else.
[0] GPUs are a lot more "implicitly SIMD" than the explicit SIMD on CPUs; but the underlying design is still a single instruction decoder running one instruction on wide vector registers.
[1] AKA "tensor cores"
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?
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.
One user with the email AHuang234@protonmail.com leaked the internal docs
(why would someone use proton mail, then proceed to use such an identifiable handle?)
One day there will be fines for unpublished/incomplete datasheets?
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.
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.
so are enforced traffic laws. Unfortunately without them the morning drive would have more in common with gladiatorial combat than commuting.
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.
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.
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.
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.
I think you meant: violate copyright protection.
Nvidia does not want that sort of precedence: then it means that every AI-produced software is "contaminated" with GPL, proprietary licenses, etc.
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.
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?
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.
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.
The reputation is a decade out of date
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.
For the open sourced radeon drivers? Yeah lots of things work great now.
For their own in house proprietary drivers? Lol, Lmao.
Ok, what are 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
LLMs today probably greatly accelerate the tedious parts of "reverse-engineering"
And makes me wonder what the author thinks "clean room" means.
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.
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.
That's the opposite of what clean room means, not just a "different view".
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...
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.
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'
"My parents refused to buy me any more Clod tokens unless I cleaned my room."
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...
I am now thinking of telling my LLM to decompile all the blobs in RaspberryPi just because why not.
That and the existing kernel driver is already open source.
Same docs they use internally. I remember.
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.
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.