Remix.run Logo
▲ diydsp 3 hours ago

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?

▲Betelbuddy 2 hours ago | parent | next [-]

>> And clearly not documented anywhere outside HQ.

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

▲zoobab 2 hours ago | parent | next [-]

">> 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?

▲stronglikedan 42 minutes ago | parent [-]

Jeez, I hope not. That sounds very authoritarian.

▲swiftcoder 30 minutes ago | parent [-]

And yet necessary to ensure adversarial interoperability

▲ an hour ago | parent | prev | next [-]
[deleted]
▲badgersnake an hour ago | parent | prev | next [-]

So not clean room at all then

▲KPGv2 43 minutes ago | parent [-]

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.

▲badgersnake 32 minutes ago | parent [-]

The leaked document is almost certainly subject to copyright, anyone making copies of it is certainly liable for breach to copyright.

▲bluGill 19 minutes ago | parent | next [-]

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)

▲ 10 minutes ago | parent | prev | next [-]
[deleted]
▲fulafel 3 minutes ago | parent | prev [-]

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?

▲az226 2 hours ago | parent | prev [-]

Lol

▲tsukikage 2 hours ago | parent | prev | next [-]

> 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.

▲maybewhenthesun an hour ago | parent | prev | next [-]

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.

▲cogman10 3 hours ago | parent | prev | next [-]

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.

▲cillian64 3 hours ago | parent [-]

But at least in theory this claims to support pre-GSP cards (maxwell, pascal)

▲cogman10 2 hours ago | parent [-]

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.

▲Pannoniae 2 hours ago | parent [-]

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

▲e4m2 2 hours ago | parent [-]

> 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

▲zaptheimpaler 2 hours ago | parent | prev | next [-]

There was already a big leak of proprietary NVIDIA driver source a few years ago. Overall there’s probably lots of information out there.

▲mrtesthah 2 hours ago | parent [-]

Leaks would preclude a “clean room” implementation — perhaps the authors are hoping that no one calls their bluff?

▲ndriscoll an hour ago | parent | next [-]

They don't as long as one person e.g. documents what various registers do from the leak and another writes the code.

▲zug_zug 2 hours ago | parent | prev | next [-]

Does that mean every driver ever written with AI from now on is using proprietary material from 100s of companies?

▲lelanthran an hour ago | parent | next [-]

> 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.

▲BigTTYGothGF an hour ago | parent | prev [-]

Surely it's been that way since the beginning, proprietary stuff would have been vacuumed up in the training data.

▲worthless-trash an hour ago | parent | prev | next [-]

If AI can get away with training on differently licensed code, why is this any different ?

▲teiferer an hour ago | parent [-]

I find the irony in this particular product absoutely hilarious.

▲dagmx 2 hours ago | parent | prev | next [-]

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

▲sharifhsn 2 hours ago | parent [-]

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".

▲cozzyd 2 hours ago | parent [-]

I mean, you did sweep the floor recently, right?

▲throawayonthe 25 minutes ago | parent | prev [-]

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

▲kimixa 3 hours ago | parent | prev | next [-]

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.

▲jeroenhd 2 hours ago | parent | next [-]

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.

▲orthoxerox 2 hours ago | parent | next [-]

The original "clean room" didn't involve any decompiling, IIRC, only describing directly observable behavior in excruciating detail.

▲sandos an hour ago | parent [-]

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.

▲kimixa an hour ago | parent [-]

I think that just shows you should not rely on that "friendly AI" for legal questions :p

▲willis936 2 hours ago | parent | prev | next [-]

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?

▲teiferer an hour ago | parent [-]

I'd even see this as the point of this repo. If the owners go through with it.

▲breakwaterlabs 2 hours ago | parent | prev [-]

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.

▲ndriscoll an hour ago | parent [-]

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?

▲strobe 2 hours ago | parent | prev | next [-]

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.

▲faldore 2 hours ago | parent | prev | next [-]

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.

▲6581 2 hours ago | parent | next [-]

> 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".

▲disperso 2 hours ago | parent | prev | next [-]

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.

▲elehack 2 hours ago | parent | prev | next [-]

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".

▲load-bearing 2 hours ago | parent | prev [-]

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...

▲jrmg an hour ago | parent | next [-]

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.

▲load-bearing an hour ago | parent [-]

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.

▲torginus an hour ago | parent | prev [-]

This is a bit of an aside, but have ReactOS devs ever tried to build an NT based OS without the Win32 compat layer?

▲cogman10 3 hours ago | parent | prev | next [-]

They vacuumed before firing up claude code.

▲functionmouse 2 hours ago | parent [-]

good one

▲supjeff 2 hours ago | parent | prev | next [-]

im here to register my dismay at the use of "clean room" too. vague nonsense

▲torginus an hour ago | parent | prev | next [-]

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'

▲leobuskin 2 hours ago | parent | prev | next [-]

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.

▲rickdeckard 2 hours ago | parent | prev [-]

> "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...

▲cozzyd 2 hours ago | parent [-]

Author forgot to get a billion dollar valuation before shrugging off IP law

▲torginus an hour ago | parent | prev | next [-]

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.

▲fooblaster an hour ago | parent | prev | next [-]

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.

▲0c3ca83 29 minutes ago | parent | prev | next [-]

That's all in the firmware. This is a copy paste from the open source Nvidia driver.

▲ 3 hours ago | parent | prev [-]
[deleted]