Friday, June 30th 2023
Chinese Research Team Uses AI to Design a Processor in 5 Hours
A group of researchers in China have used a new approach to AI to create a full RISC-V processor from scratch. The team set out to answer the question of whether an AI could design an entire processor on its own without human intervention. While AI design tools do already exist and are used for complex circuit design and validation today, they are generally limited in use and scope. The key improvements shown in this approach over traditional or AI assisted logic design are the automated capabilities, as well as its speed. The traditional assistive tools for designing circuits still require many hours of manual programming and validation to design a functional circuit. Even for such a simple processor as the one created by the AI, the team claims the design would have taken 1000x as long to be done by humans. The AI was trained by observing specific inputs and outputs of existing CPU designs, with the paper summarizing the approach as such:
Sources:
Tom's Hardware, arxiv.org
(...) a new AI approach, which generates large-scale Boolean function with almost 100% validation accuracy (e.g., > 99.99999999999% as Intel) from only external input-output examples rather than formal programs written by the human. This approach generates the Boolean function represented by a graph structure called Binary Speculation Diagram (BSD), with a theoretical accuracy lower bound by using the Monte Carlo based expansion, and the distance of Boolean functions is used to tackle the intractability.The resulting RISC-V32IA processor dubbed "CPU-AI" was taped out on a 65 nm lithography and operates at 300 MHz—with up to 600 MHz being possible—and is able to successfully run Linux, SPEC CINT 2000, and Dhrystone, performing similarly to Intel's venerable i486SX from 1991. Though they did not qualify which speed of i486SX they compared against, be it 16, 25, or 33 MHz. They suggest that performance could still be improved with augmented algorithms, and In the conclusion of the paper the research team speculates on a self-evolving machine that can design its own iterative upgrades and improvements. While that may be far off in the future the AI did independently discover the von Nuemann architecture through its observation of inputs and outputs. This leads to speculation that the algorithm can be tweaked to focus on fine-grain architecture optimization to work around traditional bottlenecks that it may encounter, a task which can usually be quite difficult for human engineers to accomplish.
19 Comments on Chinese Research Team Uses AI to Design a Processor in 5 Hours
Humans are writing themselves right out of the equation.
its a first step I guess, I have a hard time placing he achievement.
could it be given an fpga and try out its own designs and improve upon them?
The performance aspect is the first thing anyone ever focuses on, but it's incredibly short sighted. The paper details how simple the starting algorithm actually is from an implementation level, and the amount of training required to construct a new processor from scratch using only input/output tracing was fairly reserved. They also did not implement any algorithm changes beyond what it took to start producing accurate results. They didn't even give it an overview of the processors it was tracing, only their inputs and outputs. Yet it 'discovered' the underlying design elements from only that training data. Give it iterative capabilities and train it on much deeper wells of data and even if it takes 100 hours to create a processor it's still exceeding the capabilities of a dedicated team of engineers by literal years.
Further, they will only improve in complexity and scale with time. It wasn't a “would” or “could”, but very much a “when” and everyone with the bucks to spend worldwide is implementing machine learning currently.
Excerpt:
Look, advancements in BDDs is cool and all, but holy shit. These researchers are overhyping their product. When people talk about AI today, they don't mean 1980s style AI. Don't get me wrong, I like 1980s style AI, but I recognize that the new name of 1980s-style is called "Automated Theorem Proving". You can accomplish awesome feats with automated theorem proving (such as this new CPU), but guess what? A billion other researchers are also exploring BDDs (ZDDs, and a whole slew of other alphabet-soup binary (blah) diagrams) because this technique is widely known.
"Chinese AI Team innovates way to call Binary Decision Diagram competitor an AI during the AI hype cycle". That's my summary of the situation. Ironically, I'm personally very interested in their results because BDDs are incredibly cool and awesome. But its deeply misrepresenting what the typical layman considers AI today (which is mostly being applied to ChatGPT-like LLMs, or at a minimum, deep convolutional neural networks that underpin techniques like LLMs).
------------------
Furthermore, standard BDDs can create and verify Intel 486-like chips quite fine. That's just a 32-bit function (64-bits with 2x inputs), probably without the x87 coprocessor (so no 80-bit floats or 160-bit 2x inputs). Modern BDD-techniques that's used to automatically verify say, the AMD EPYC or Intel AVX512 instructions are doing up to 3x inputs of 512-bits each, or ~1536-bits... and each bit is exponential-worst case for the BDD technique. So... yeah... 64-bit inputs vs 1536 isn't really that impressive.
----------- I literally have an example of this sitting in my 1990s-era BDD textbook. This isn't new at all. This team is overselling their achievement. Albeit my textbook is only on the "textbook" level Reduced Ordered Binary Decision Diagram, with a few notes on ZDDs and the like... but I'm not surprised that "new BDD-style" could lead to some unique advantages.
Now, BSD (or whatever this "Binary Speculation Diagram" thingy is) might be interesting. Who knows? New BDDs are discovered all the time, its an exceptionally interesting and useful field. Necessary to advance the state-of-the-art of CPU design, synthesis, testing. Furthermore, this is exactly the kind of technology I'd expect hardcore chip designers to be using (its obviously a great technique). But... its industry standard. This is what CPU researchers are studying / experimenting with every day for the past 40+ years, I kid you not.
------------
BTW: ROBDDs (and all data-structures based off of BDDs) are awesome. I'd love to divert this topic and talk about ROBDDs, their performance characteristics, #P complete problems, etc. etc. But... its not AI. Its automated theorem proving, its exhaustive 100% accurate search with perfectly accurate designs of perfectness. Its not very hard to build a circuit today if you already have the boolean truth table.
Remember: BDDs (and BSD, being a derivative technique of BDDs), stores the entire truth table of boolean operations. In a highly optimized, compressed fashion in a graph-database yes. But its a complete representation of the boolean function.
Its easy to automatically create a multiplier, if you have the 32x32 exhaustive input list of multiplication already. And indeed, modern verification / testing / BDD data-structures build circuits using this.
It takes on avg 150 experienced chip designers - what if you could replace half of that workforce and the financial benefit you get from it?
Thats 75 engineers less on a payroll for the next 3 years - with perhaps the job even done better, faster or more efficient.
They make Verilog or VHDL. This then compiles into RTL or some other lower level language. Eventually, the synthesis programs create a BDD. That BDD then synthesizes into NAND gates to be laid out, and then the autorouter automatically runs the wires between these parts and makes the final layout.
Maybe humans go over the layout and try to assist the autorouter. But all these low level steps are already programs.
All this paper would do is replace the BDD step (fully automated computer program) with BSD, a new data structure that this paper discusses.
------------
Like, imagine if LLVM compiler (aka clang) billed itself as an AI that would reduce programmer time. Like, it's not wrong. There are traditional AI tasks (such as the coloring problem to solve register allocation) and better compilers will allow fewer programmers to accomplish the task of programming.
But it'd be misleading to argue it were an AI to laypeople / lay audience.