An engineer has shared his journey in “building a GPU from scratch with no prior experience.” As with his prior project ofdesigning a CPU from scratch, Adam Majmudar took just two weeks to complete this cerebral feat. In aTwitter/X threadMajmudar takes us through the process, step-by-step, and admitsGPU designingwas a much harder task than expected. To be clear, the current conclusion of the project is a chip layout in Verilog which was finally passed through OpenLane EDA software to verify it. However, the GPU is going to be submitted for tapeout viaTiny Tapeout 7so is destined to become a physical chip in the coming months.

Above you can see the flow of tasks Majmudar worked through to design his GPU. Yet, as a ‘from scratch’ project, a lot of study and thought was required even before the first step was tentatively taken. Last time we highlighted the engineer’s concerns that GPUs would be a relatively difficult field of study, due to the dominance ofproprietary tech, as that prediction came true.

GPU from scratch

Through several iterations of the above architecture, Majmudar decided to focus on general-purpose parallel computing (GPGPUs) capabilities. Thus he adjusted his Instruction Set Architecture (ISA), which features just11 instructions, to achieve this goal. Next up, the engineer wrote two matrix math kernels to run on his GPU. These matrix addition and multiplication kernels would demonstrate the key functionality of the GPU and provide evidence of its useful application in graphics andmachine learningtasks.

It had been relatively easy for the engineer so far, but building his GPU in Verilog presented “many issues.” Advice from the (in)famousGeorge Hotzhelped Majmudar move past one of his first (and second) hurdles regarding memory and a warp-scheduler implementation. A third rewrite of his code did the trick though, fixing compute core execution scheduling.

GPU from scratch

Some more unspecified redesigns later and the proof of the pudding, a video showing the matrix addition kernel running and validating, was shared in the Tweet thread.

Lastly, the completed Verilog design was passed through OpenLane EDA, targeting the Skywater 130nm process node (for Tiny Tapeout). Again some issues needed to be ironed out. In particular, Majmudar explains that some Design Rule Checks (DRCs) failed and necessitated rework.

GPU from scratch

After the two-week effort, the engineer enjoyed playing with a cool3D visualizationof his GPU design. That will have to suffice until TT7 returns silicon to participants. Of course, the work isn’t going to rank amongthe best graphics cards. If you want to read more about this homemade GPU check out the entertaining social media thread and / or investigate the dedicatedTiny-GPU GitHubpage.

Get Tom’s Hardware’s best news and in-depth reviews, straight to your inbox.

GPU from scratch

Mark Tyson is a news editor at Tom’s Hardware. He enjoys covering the full breadth of PC tech; from business and semiconductor design to products approaching the edge of reason.

Mark Tyson