Try Pro free

The best 18 min of 80

Chip design from the bottom up – Reiner Pope

Reiner Pope argues that AI chip performance depends as much on moving data efficiently as on the arithmetic itself.

Dwarkesh Podcast · Dwarkesh Patel

The best minutes

  1. 16:00Moving data can cost more than doing the computation6 min
  2. 25:20Systolic arrays reuse weights to reduce data movement7 min
  3. 58:43FPGA lookup tables spend extra gates for flexibilityPro pick 5 min

Also worth watching

  1. 51:41ASICs are efficient, but their first tape-out costs $30 million7 min
  2. 45:54Feedback loops can set a chip’s clock-speed limit5 min
  3. 1:03:24Scratchpads let software control data placement4 min
  4. 1:08:13Branch predictors and caches take area in CPU cores4 min
  5. 1:13:04A slower clock does not greatly improve energy efficiency2 min

Skip the opening logic-gate multiply-accumulate walkthrough, the remaining mux and systolic-array diagrams, and the sponsor reads.

Full analysis · 5 min read

Real Alpha · Nov 10

Reiner Pope says register selection can take 24p gates

  • In Pope’s example, three register selections cost 24p AND gates, against four p for multiply-accumulate.
  • Dividing gives a sixfold ratio in this example, not a whole-chip area or energy measurement.
  • Systolic reuse and software-directed placement matter more than peak arithmetic alone.

Free with an account

Read the rest of the analysis

6 sections, the 3 other voices it tests Pope against, and what it means for you. Every episode we cut gets one.

Signed up before? The same buttons sign you in. The episode, its moments and the transcript stay free.

20:46

Register selection can dwarf the arithmetic

Pope’s example puts a scale on the hidden cost. For an eight-entry register file, he counts three selection paths, each requiring eight p AND gates. That gives 24p AND gates for selection, against four p for multiply-accumulate when q is four.

Dividing 24p by four p gives six, our calculation from his example. It is not a measured ratio for a commercial GPU, total chip area or energy use.

For example, software may request register three as if selection were free. Hardware still needs a multiplexer for each of the multiply-accumulate’s three inputs. That cost grows with register-file width, even when the arithmetic operation stays unchanged.

Naveen Rao, founder of Unconventional AI, made a related but distinct case on All-In in September 2026. Rao described conventional computers as wasting energy moving information, while his oscillator-based chip demonstrated image generation with far less energy. That supports the broad importance of data movement, not Pope’s mux estimate.

“many, many times more expensive than the logic unit.”
21:25

Our read

Pope shows why operation counts alone miss physical costs. His example is a design illustration, not a universal sixfold rule.

25:20

Systolic arrays trade bandwidth for local reuse

Pope’s answer is to move more of matrix multiplication into fixed hardware. A systolic array keeps the matrix local, then streams changing vectors through it for repeated calculations.

That reuse means fewer trips to the register file for the same work. Pope says the matrix can stay fixed for a long period in an AI workload, while vectors change. The advantage depends on that reuse actually happening.

So loading the matrix slowly can make sense. Pope describes trickling values into the array over a narrow connection, because they will remain there and be reused. Less bandwidth at the boundary can leave more chip area for computation.

Andrew Feldman, Cerebras co-founder and CEO, discussed HBM and SRAM work on Uncapped in September 2026. His proposal targets memory access, another data-movement problem, but does not test Pope’s local-reuse design.

Our read

Local reuse is the central architectural bargain. It pays when data stays useful on chip long enough to offset loading and arrangement costs.

1:06:03

Scratchpads make placement a software decision

Pope contrasts CPU caches with TPU scratchpads. A CPU checks whether requested data sits in cache before fetching it from DDR.

He says the cache is about two orders of magnitude faster than DDR. Removing it would slow programs sharply, but cache hits depend on recent activity and other programs. That makes access time less predictable.

A TPU scratchpad makes placement explicit. Software uses different instructions to access scratchpad and HBM, rather than leaving the hardware to decide whether requested data comes from cache.

For an accelerator team, the choice is not simply fast memory versus slow memory. It is also a choice between hardware-selected placement and software-selected placement. That may help workloads that need explicit data paths, but Pope gives no engineering-cost estimate.

Our read

Scratchpads exchange automatic placement for explicit control. The fit depends on whether software can make the placements a workload needs.

52:26

ASIC efficiency demands a costly first tape-out

Pope says an ASIC can be about an order of magnitude cheaper and more energy-efficient than an FPGA. But a first ASIC tape-out costs about $30 million, he says.

FPGAs buy flexibility through configurable logic and connections. Pope’s four-input lookup-table example shows the circuit cost. It can implement a four-way AND using 32 gates, he says, while a fixed ASIC implementation uses three.

That makes design stability central to the choice. Pope gives the example of a design changing every month or something like that. But tape-out economics make the ASIC case depend on a stable design and enough use.

Jeff Dean’s Lightcone episode in July 2026 linked Google’s TPU effort to speech-server costs. Better speech recognition threatened to double the server fleet, according to that account. It shows operating costs can motivate specialization, not that every ASIC pays back.

Our read

The savings depend on scale, stability and utilization. The tape-out figure is a capital requirement, not a promise of lower total cost for every workload.

46:19

Feedback loops can cap clock speed

Pope says a straight logic path can be split by adding registers. That allows a faster clock, but each register takes area. More clock cycles therefore do not guarantee more useful work per unit area.

Take a running sum that feeds its output into the next cycle. Pope says inserting a register inside its addition creates separate sums for even and odd inputs. The feedback loop cannot be pipelined like a straight path without changing the calculation.

Pope says most chip energy goes to switching bits from zero to one and back. Slowing a chip cuts total power by reducing transitions over time, but gives little efficiency gain for the same work.

That distinction matters because workload completion, throughput and power answer different questions. For a buyer, compare work completed and energy per task, not clock rate alone.

Our read

Clock speed, throughput and energy are separate measures. Area, dependencies and switching activity set their trade-offs together.

1:20:04

MatX has discussed arrays that split in size

At the whole-chip level, Pope describes GPUs as many small TPU-like units. Each GPU streaming multiprocessor contains a tensor core analogous to a TPU matrix unit. TPUs instead use larger matrix units alongside vector units, letting larger systolic arrays amortize register-file costs.

That scale changes how data crosses between the two kinds of units. At the host’s suggestion, data movement within a GPU SM may cover less area. Pope agreed that work staying entirely inside an SM has much smaller data movement.

By contrast, Pope said vector-to-matrix traffic in a TPU must cross about two boundary lines. He contrasted that with perhaps 16 lines of wiring in a GPU. This compares bandwidth across boundaries, not how far TPU data moves.

At the end, the host proposed combining small units with larger arrays. Pope said MatX has publicly discussed splittable systolic arrays, but gave no performance figures. The host disclosed an initial investment in MatX, and Pope is the company’s CEO. That relationship is context, not evidence for or against the design.

Our read

Splittability could address the tension between large-array reuse and smaller-unit flexibility. The conversation frames that architectural question rather than establishing MatX’s performance.

What it means for you

  1. Count selection gates. For a representative kernel, map register selections beside multiply-accumulate units. Compare the gate or area budget with the advertised arithmetic rate.
  2. Measure matrix reuse. Track how many changing vectors reuse each matrix, and how long it stays local. Those figures test whether systolic reuse fits your workload.
  3. Test memory placement. Compare cache behavior with explicit scratchpad placement on a workload that needs predictable access. Measure completed work and latency, not just memory speed.
  4. Model tape-out economics. Include the stated $30 million first tape-out cost in the capital plan. Compare it with design stability and expected use before choosing a development path.

What to watch

  • Whether MatX publishes performance, traffic or energy measurements for its splittable systolic array.
  • Whether real workloads reuse matrices long enough to offset the cost of loading them.
  • Whether accelerator comparisons report data movement alongside arithmetic rates.

Send this to the hardware lead setting an accelerator’s memory and compute budget.

17:48

Watch the 3 minutes starting as Pope sets up register-file data movement

Written by Real Alpha from the episode's transcript and the other moments it links, then checked against the transcript. Quotes are the speaker's exact words.

Minute by minute

  1. 0:17Logic gates build multiply-accumulate units

    Pope says logic gates connected by physical wires are the basic building blocks of chips. He explains that matrix multiplication repeatedly uses multiply-accumulate operations, then demonstrates a 4-bit multiplication with an 8-bit accumulation. He says accumulation needs more precision because rounding errors build across many summed terms.

  2. 6:02Full adders compress partial products

    Pope describes a full adder as a circuit that takes three bits and produces two, reducing the number of bits that must be summed. In his example, 16 partial products plus 8 accumulation bits are reduced to 8 output bits, requiring 16 full adders. He says a P-bit by Q-bit multiply uses P times Q full adders in this circuit.

  3. 12:46Low precision saves more area

    Pope says FP4 and FP8 hardware is not fully fungible, so designers choose a mix based on customer needs and power budgets. He says multiplier area scales quadratically with bit width, making lower precision especially attractive. He notes that NVIDIA specs from B300 onward list FP4 at three times FP8 throughput, though he says the scaling suggests four times.

  4. 16:00Data movement can dwarf arithmetic

    Pope compares the cost of moving values from a register file to a multiply-accumulate unit with the cost of the computation itself. A mux selects a register, but building one for an eight-entry file requires circuitry for each entry and bit. In his example, moving three inputs can require more gates than the multiply-accumulate operation.

  5. 25:37Systolic arrays reuse weights locally

    Pope says systolic arrays address this imbalance by building a larger portion of matrix multiplication into hardware. The array keeps a weight matrix in local registers while input vectors move through it, so the same weights can serve many vectors. He says this increases computation per unit of register-file traffic.

  6. 36:27Register files compete with compute

    Pope says designers must size both the systolic array and its register file. A larger register file supports more flexible applications but takes area away from the array. As an example, he suggests allocating 10% of chip area to data movement and 90% to the systolic array.

  7. 38:48Pipelining trades area for speed

    Pope defines a clock cycle as the interval when chip registers synchronize. To raise clock speed, designers shorten the logic path between registers, sometimes by inserting pipeline registers. Those registers use area, and each path must finish before the next clock cycle.

  8. 45:43Feedback loops constrain clock speed

    Pope says a feedback path, such as a running sum, is harder to pipeline: inserting a register midway would change the computation into separate sums for even and odd inputs. He says loops that cannot be split without changing the result can set the chip’s clock limit.

  9. 51:32FPGAs trade cost for flexibility

    Pope says anything expressible in an FPGA can also be built as an ASIC, which he describes as about an order of magnitude cheaper and more energy efficient. He contrasts a $10,000 first FPGA with a $30 million first ASIC tape-out. He says FPGAs make sense when a design changes often enough that repeated tape-outs would be costly.

  10. 56:48LUTs implement gates expensively

    Pope describes a common FPGA lookup table as a four-input, one-output truth table with 16 stored entries. Muxes configure its inputs and connections. He says a four-input AND can use 32 gates worth of lookup-table circuitry, compared with three AND gates in an ASIC.

  11. 1:04:19Scratchpads make memory access explicit

    Pope says CPU caches are two orders of magnitude faster than DDR, but cache hits depend on other programs, recent accesses, and the cache system, creating variable latency. In a TPU scratchpad design, he says software uses distinct instructions for scratchpad and HBM access, rather than leaving the choice to hardware.

  12. 1:08:23CPU cores include more control logic

    Pope says branch predictors are a major difference between CPUs and GPUs: they predict whether a branch will be taken so the CPU can keep executing instructions while it resolves the branch. He says branch predictors and less compact register files contribute to larger CPU cores, while GPUs can fit more CUDA cores.

  13. 1:11:41Lower clocks do not guarantee efficiency

    Pope says running a chip much more slowly would not produce a 1,000-fold energy-efficiency advantage. Most chip energy goes to switching bits through capacitor charging and discharging, while settled circuitry can sit idle at low energy. He contrasts a GPU workload with batch size 1,000 against the brain’s one-person case.

  14. 1:15:19GPUs tile many small TPU-like units

    Pope contrasts GPUs, which tile many streaming multiprocessors, with TPUs, which use fewer, coarser matrix units and a vector unit. He describes a GPU as many small TPU-like units, while noting that a TPU can support larger systolic arrays. Pope says MatX has discussed a splittable systolic array that can operate as either a large or smaller array.

Published May 22, 2026.

Transcript · 1 h read

Dwarkesh Podcast, hosted by Dwarkesh Patel, with Reiner Pope.

Transcribed by machine (Whisper) from the episode’s audio, so a word may be off here and there.

  1. Full disclosure, by the way, I am an initial investor in Maddox. So hopefully you have designed a good chip. Also, if you're listening to this on an audio platform, it's much preferable to watch this Blackboard lecture on a platform where you can see what's happening. So switch over to YouTube or Spotify? So I'll start with sort of the very smallest fundamental unit of chip design, and we'll sort of build up into what an overall, like, actual production chip, what are the components of that. At the very bottom level of a chip, the primitives that we work with are logic gates, which are very simple things like and or not.

  2. And then these are connected together by wires that have to be laid out physically as metal traces on a chip. The main function that AI chips want to compute is multiplication of matrices, and really inside that is the fundamental primitive is multiply-accumulative, just like of pairs of numbers. So we're gonna sort of demonstrate what that calculation looks like by hand, and then sort of infer what a circuit would look like for that. It'll turn out to be sort of easiest if I do multiplication-accumulative, of something like a 4-bit number with another 4-bit number. And then we're going to, the actual clearest primitive is actually multiply accumulate.

  3. So there's a multiply these two terms, and then we're going to add in, so product of these two terms, and then we're going to add in an 8-bit number. all right and can i ask a clarifying question why is this the um natural primitive for um you know whatever computation happens inside a computer yeah so um there's a few reasons for this uh it's a little bit more efficient um but the the reason it's natural for ai chips is that if you look what's happening during a matrix multiply the uh what is matrix multiply in very short it is um uh there's a for loop over i and over j yeah and over k of output i k plus equals to um input i j times other input jk and so multiply accumulate happens at every single step of a matrix multiply.

Read the whole transcript
  1. Makes sense. And then the other observation is that the precision will almost always be higher in the accumulation step than in the multiplication step. This is maybe specific to AI chips, but you're multiplying low precision numbers, but then when you accumulate, errors accumulate quickly, and so you need more precision here. So this is why we've chosen to do a 4-bit multiplication and an 8-bit addition. Let me make sure I understood that. There's two ways to understand that. One is that the value will be larger than the inputs. And the other is that if it was a floating point number, it would be, maybe that part is like less intuitive to me, but it's maybe the same principle. It is really the same principle. I guess the sort of, I mean, I guess the separate principle is that as you are summing up this number, you are summing up a whole bunch of numbers. And so you've got a lot of rounding errors accumulating.

  2. Whereas in this case, there's like, there's only one multiplication in that chain. And so there's not a lot of rounding errors accumulating in the multiplication. Why are you summing up a whole bunch of numbers? It's just two numbers. Just, I mean, this summation happens, it's repeated j many times. So yeah, any errors accumulate. I see. Yeah, makes sense. So how would we perform this calculation by hand? I mean, as a human, we would probably separate it into two, but we can sort of do it all in one. using long multiplication. So the multiplication term first, we're going to multiply this number, this 4-bit number here, by every single bit position in the other 4-bit number.

  3. So we write that out, first 1, 0, 0, 1 multiplied by this bit position, that is this number itself, then shift it across by 1, we're multiplying by 0, that gives us an old zeros number. Shifted across even one more to multiply by this one we get 1001 and then finally for this last last bit position we get an old zeros number again. So this this sort of gives us a bunch of terms that we're going to have to add for the for the multiplication and then while we're doing that summation of this we might as well add in the the actual accumulated term as well and so we just copy that directly across so so this is the sum it's a it's a five-way sum that we're going to want to commute so firstly what what logic gates did it take us to even get to this intermediate step, we needed to produce all 16 of these partial products.

  4. How do I produce one of these partial products? So let's take this number one for example here. It is one, so what was it, how do we produce this number by multiplying this number by this one over here? We can actually produce that by an AND gate. This number is one if both this bit is one and And this bit is 1. If either of them is 0, then the multiplication of 1 times 1, of 0 times anything is 0. So to produce all of this stuff, we ended up consuming 16 AND gates. Or in the general case, if I were doing a P bit multiply times a Q bit multiply, then then this will be like p times q, many ands.

  5. Exactly. Finally, I sum them. Actually, most of the work is going to happen in the summing. And so let me describe sort of the other logic gate that we use here. And is almost the simplest logic gate that exists on a chip. It's almost the smallest. At the other extreme, typically the very largest logic gate that you'll use is something called a full adder and what this does is sort of it does like coming from software you might think that a full adder it adds 32-bit numbers together in this case it just adds three single-bit numbers together and so you can think of it as like adding zero one and one together now when I add these together the result can be zero one two or three so I can express that in binary using just two bits. So it has input it has three bits and as output it has it has two bits which in this case are one is like the number two in binary is one zero. So this is also known as a three to two compressor because it takes three bits of input and produces two bits of output. The two inputs are an x and a by value and then some carry that came in from like the sorry the the the three inputs are um all all bits that are in the same sort of bit position like three bits that are in a column

  6. here yeah yeah and then the two outputs um i i have sort of drawn them vertically here and horizontally here to kind of match this vertical versus horizontal layout here which is expressing that um things that are in the same column are in the same like bit position yeah um whereas things that In the JSON columns, like this is a carry out, whereas this was the sum. So if the inputs in the full adder are, let's say, like 101, then the output would still be 10. If it was 111, it'd be 11. It was 000, it'd be 00. It was like 010, it'd still be 01. So yeah, it's just counting, essentially, the number of things and expressing that in binary.

  7. So this circuit actually can sort of capture what we as humans naturally do when we're doing summing along a column. So I can show that sort of, I'll show sort of one iteration of using the full adder to sum. The way I sum here is going to be a little bit unnatural for humans. Humans, we would sort of sum along the column and then remember the carry, but instead of remembering carry we'll actually just explicitly write it out. So in this we proceed from the rightmost column towards the left. On the rightmost column we sum the one and the one and that produces like a zero here and a carry of one. So we've sort of used this full adder circuit on this pair of bits and produced a pair of bits as output. Now we can do the same thing with this column. We've got a column one, two, three, four numbers and so maybe we'll take the first three of them, run a full adder on them and that gives us a zero and a zero as output. So like the sum of these is zero, zero.

  8. So that's the full compressor, full adder applied to all of these bits. As I've used up bits I'm going to sort of just cross them out to indicate that I've handled them. Let's just keep going a little bit more so we'll go here I take these three numbers I add them that gives me a one and a zero I've dealt with these three numbers and now I take one two and I can even take these three numbers for example right now and add them and that gives me a one and a zero and I've dealt with these numbers so I can sort of like the way I should view this is that I have this whole grid of numbers that need to be added. I'm going to just keep applying full adders to all the bits that are here, constantly removing three numbers from a column and then writing out two numbers as output.

  9. Keep going with this over and over and over again until I eventually get like some, just one single number coming out here. Something like that. This is probably the wrong sum. So this approach that I've described here, this is called a data multiplier, and this is sort of like the standard for how you do error-efficient multipliers using full adders. Let's try and quantify the circuit size of this just so we have got a sense of like how big things are, so we can compare to them later. How many full adders did I use? I started with how many numbers? I have the 16 partial products which is the product of all of these terms with all of these terms plus the eight terms that I'm adding here so I started off with 24 bits and then I produced eight bits on the output eventually and in every step I was sort of crossing off three numbers and writing two numbers out in result.

  10. And so every single use of a full adder eliminates one of the bits here. And so how many full adders, it must be the 24 minus the eight. So there were 16 full adders in this circuit. In general, this is true in the general case as well, there will be P times Q many full adders in this circuit. Let me try and understand the logic of that. So the input bits 24 is P times Q plus P plus Q. That's right. And the output bits is... just p plus q, and so p times q plus p plus q minus p plus q equals p times q. That's right. So I think this explains sort of, or at least hints at, the second reason why we chose to do a multiply-accumulate.

  11. First reason being that's actually what shows up in matrix multiplication, but second reason being it gave us this very slick p times q, very simple algebra. so we've sort of described like this this whole procedure every single uh atomic step that i took here becomes a logic gate and then sort of the wires connected together like when i had these three inputs that that i salvaged to produce these two outputs like if i think of mapping this to a physical device it would be a wire that runs sort of connecting all three of these things together into a logic gate that produced this output. Okay, so this is the main primitive at different bit widths that is inside an AI chip.

  12. We're going to build up from here to how would you use that to run all of the other operations you may want. This might be the wrong time to ask this question, but whenever NVIDIA reports that this chip can do X many FP4 or half as many FP8, it seems to imply that those circuits are fungible uh that there's not as dedicated like fp4 versus fp8 um but the way you you're mapping it out here it seems like you would need if it has to be mapped out in the logic you would need a dedicated um fp4 multiply accumulate and a dedicated fp8 accumulate basically can you can you funge them as drawn they're actually not particularly fungible um this is actually one of the main choices you have to make when designing a chip which is how much of fp4 how much of fp8 do i have and then sometimes i'll make that consideration from the point of view of like uh what do i think that is the customer requirement another way to take an angle on that is to say um what is the what is the power budget for uh equalize the power budget between fp4 and fp8 but so then when they report those numbers and they just happen to be the case of like it does 2x as many fp4 as fp8 they just happen to choose like give the equivalent die areas to all the floating points

  13. and as a result, it ended up being... Like, why is the ratio exactly 2x? Yeah, exactly. Yeah, so part of it is, I mean, surely that won't be exactly equivalent to die area. There's a data movement reason, actually, and we'll maybe come back to this when we sort of look through how it goes into and out of memories. There's something really nice just from a software level of the fact that I can pack two 4-bit numbers into the same storage as an 8-bit number, And so when I store that to a memory or something like that, the sizing of the buses that I wire within the chip actually makes that work out really, really nicely.

  14. I actually come to think of it, it's not just 2x. It would be the amount of area it takes, it sounds like, is quadratic. It's quadratic, in fact. With the bit length. So that's why smaller precision is even more favorable than the United States. This is a really big reason. So, in fact, NVIDIA made a change. Historically, up until B100 or B200, every time you have the bit precision, you double the flop count. That ratio is exactly, like for the reason you said, because of this quadratic scaling, that ratio is actually slightly wrong. It should be like an even bigger, you should get an even bigger speed up than you might otherwise think.

  15. NVIDIA's product specs have sort of started acknowledging that in B300. and beyond where the fp4 is three times faster than the fp8 though it should be 4x yeah what i've shown here is like the simplest case of integer multiply when you're when you're dealing with floating point as you do in fp4 and fp8 um there's this sort of other term which is the The exponent that just complicates this calculation. So what can we see already from this? I think the big observation you've made is that there's this quadratic scaling with bit width, which is very effective and is the single reason why low precision arithmetic has worked so well for neural nets.

  16. Reiner Pope · 6 min

    “all of this work just moving the data from the register file to the logic unit is many, many times more expensive than the logic unit.”

  17. Semi-Analysis ranked almost 100 different GPU clouds. Crusoe was one of only five that made the gold tier. Semi-Analysis found that gold tier providers like Crusoe had a total cost of ownership that was 5% to 15% lower than silver tier ones, even when they had identical GPU pricing. This makes sense because total cost of ownership is downstream of a bunch of different things that don't necessarily show up in the sticker price, but that Crusoe has optimized. Things like how well you detect faults and how quickly you replace failed nodes. For example, Crusoe was one of the first clouds to adopt Envy Sentinel, NVIDIA's own GPU monitoring and self-healing software for enhanced GPU uptime, utilization, and reliability.

  18. This that's Crusoe makes use of everything that NVIDIA has learned about why chips fail across all their different fleets and deployments so that Crusoe can catch faults earlier in the process. And once they identify a failure, Crusoe can swap in a healthy node in less than 10 minutes. Because they're not running bare metal, Crusoe doesn't have to spend time installing an operating system or configuring drivers. They can just spin up a new VM on an already running and pre-qualified host. If you want to learn more about this or the other reasons that Crusoe made Gold Tier, go to crusoe.ai slash Dwarakash.

  19. It may be helpful to just see what a mux looks like, maybe like a two-bit or a four-bit mux. Yeah, great. So we'll take some inputs. We'll have maybe, like, we'll just do a two-way mux. So we've got two different numbers. We've got these two inputs. And then we have a, so these are the inputs that are being selected between. And then we have a selector, which says, which can either be like, I want this one, or it could be, I want the other one. So this is a one-hot encoding. So this is what we all start with. And then the output we want to produce, like, let's focus on this case, so this is the actual input we got.

  20. Yeah. We just want to produce this guy as the result. And so, like, sort of very laboriously, what we do is we AND this bit with all of these. And so... That produces like anding this bit with this row and likewise we and this bit with this row that produces all zeros. So this was the, there's four ands here, there's four ands here. And then finally we just or these two together. This gives a one, we or these two together, this gives a one. We or these two together gives a zero, we or these two together and it gives a one. And so this is the four ORs. So like this actually ends up looking a little bit like addition, in fact.

  21. Like we did exactly the same set of ANDs here. Sort of we've added all of these things together, but then instead of collapsing it by using these full ladder circuits, we just could get a very simple collapsing with OR gates. And how, but I guess that doesn't look like N times P. So yeah, so this was with n equals two inputs. In the general case, we will have n rows, and then we'll have p bits per row. So that gives us the n times p many and gates. So this circuit I've described here, almost all of the cost, like seven eighths of the cost, is in the reading and writing the register file. And only a tiny fraction of the cost is in the logic unit itself. So this is the problem to solve. This essentially was the state of play

  22. Reiner Pope · 7 min

    “I mean, this is the nature of what a matrix multiplication is, is that you do a lot of multiplication to get one value out.”

  23. this leaves open the question of like i said that the the weight matrices weight matrix is stored locally in the systolic array how did it get there in the first place um is sort of a like at some point you need to boot your chip and populate this data and so where did that come from the trick is just we just do it very slowly so we we very slowly trickle feed it in into the systolic array the um sort of the simplest strategy is that we we sort of run this daisy chain that says like feed a number into here, and then on the next clock cycle, it'll move down to the next entry of the systolic array.

  24. And so we can do that in every column in parallel, and that gives us sort of, this is also going to come from here, and this is going to be another factor of approximately x units of bandwidth coming in. Can you just, would you mind repeating that sentence one more time? So we're sort of like, we know that we're going to be bringing in numbers only rarely into the matrix and so we just want to come up with any construction at all such that the amount of wiring that actually feeds into sort of crosses this boundary of the systolic array like this boundary right here we just want to keep that bounded to x and not be not go as xy and so a particularly simple strategy is that we um we sort of bring in a number into the top row of the systolic array that's what we can do in one clock cycle and then for like uh for y consecutive clock cycles we're going to be bringing in the top row every time and then sort of shift all of the other rows down by one and that keeps the the sort of the wiring that needs to come from this expensive register file uh only down to a factor of x rather than x i see okay so uh there's two questions in terms of communication there's like communication time and then there's communication

  25. bandwidth, and you're saying since we're only going to be loading this in once, let's maximize, let's minimize bandwidth. That's right. Because bandwidth equals die area, and let's just load it in slowly over smaller lanes because we're just going to keep this value in there for a while. Exactly. Interesting. So it's interesting to me that when we were talking last time about inference across many chips, the big high-level thing we're trying to optimize for is increase the amount of compute per memory bandwidth, that is to say per communication. And here also we're trying to increase the amount of like actual multiplies or actual additions relative to transporting information from registers to the logic.

  26. So in both cases, you're trying to maximize compute relative to communication. Yeah, this shows up sort of all the way up and down the stack. This is sort of close to the bottom, sort of like to the gates. there's sort of a version that's maybe even closer to the gates of just like even the precision of number format that you choose to use. We saw that same effect, there's like a square cube law or like squared versus linear term going on both in just purely the precision of this ALU but then also in terms of the size of this. the the matrix yeah very interesting so um so this unit is sort of the next bigger unit we had like the multiplication the circuit and then uh on top of that we have um a like a pretty large systolic array i drew it as two by two but in like um for example older tpus they were described as 128 by 128 uh of of this circuit uh shown here um and this circuit ends up being um this is the most efficient known mechanism for a circuit for implementing a matrix multiply. I see so we've talked about sort of it seems obvious that you should try to maximize compute relative to communication what are non-obvious trade-offs that actually you are you know keep you up at night about what should we do x or should we do y and it's not obvious what the answer is. Yeah so

  27. So, I mean, I think most of the decisions in chip design are sizing decisions. And so already in what we've drawn so far, like, so AI chips all have this, this circuit in it. They have a systolic array and then somewhere near it, a register file providing inputs and outputs. The two sort of like, even within this scope, sizing questions that you have are how big should i make my systolic array and how big should i make the um the the register file the um so and and then the trade-off for the size of this size of the systolic array actually these two questions are coupled is um one way to think of it is to say i'm gonna like have a budget for um how much what percentage of my chip area i want to spend on data movement so maybe i just say that I want this to be 10% and the systolic array to be 90%.

  28. And then sort of I can size my register file. Bigger register files are more flexible. They allow me to run sort of more, I can get more application level performance out. But then they sort of take away from this area spent on the systolic array. Yeah, makes sense. I recently ran an essay contest where I asked people to write about what I consider to be some of the biggest open questions about AI. The submission window closed last week. so I use Cursor to create a couple of different interfaces to help me review the entries. One interface anonymizes submissions and hides unnecessary information.

  29. It lets me group responses by question, add notes, and record my scores. The other interface helps me review entrants who also want to be considered for the researcher role that I'm hiring for. The UI puts the applicant's essay right next to their resume and their personal website so that I can see everything at once. Cursor's Harness is really good at helping these models see and improve their UIs. I watched it render these interfaces in the built-in browser, take screenshots, click through sections, and keep iterating. At this point, Cursor is where I do most of my work. Whether I'm reading and visualizing a bunch of research papers, or coding up an interface to review applications, or making flashcards for my Blackboard lectures, Cursor just makes it very easy for an AI to look at whatever I'm looking at and help me understand it and work with me on it.

  30. So whatever you're working on, you should do it in Cursor. Go to cursor.com slash Dworkash. Where does the clock cycle of a chip come in? What determines what that is? Yeah, and what is a clock cycle of the chip? So I guess at baseline, it's sort of worth observing that chips are incredibly, incredibly parallel, right? You've got 100 billion transistors in a chip. A key thing that you need to do whenever you have like massive parallelism is you need to synchronize between the different parallel units. In software, typically, you have these very expensive synchronization methods like a mutex. So one thread will finish what it's doing, it will grab a lock somewhere stored in memory and then notify the other thread that it's done.

  31. On chips, we take a very different approach and say that every nanosecond or so, all... All circuitry in the chip will kind of pause for a moment and then synchronize every, so it actually synchronizes every single nanosecond or so. And so that is the clock cycle. The entire chip, typically all in sort of one fell swoop, goes in lockstep to the next operation that happens. And so what this looks like in circuitry is that you will have, it's typically drawn, so the clock is sort of mediated by registers, which are these storage devices that we've drawn elsewhere and the way to think of it is that I have I have some storage which is storing like a bit which might be zero or one and then I have some sort of cloud of logic which maybe is like this systolic array or this multiplier or something like that and then I've got some and that's going to produce some output so my inputs I've got a bunch of inputs feeding to this cloud of logic and then eventually later there's going to be some output register that this writes to there is a global clock signal which drives all of these registers and it says at a certain instance in time when the clock strikes whatever value happens to be on this wire at that

  32. instant that's what's going to get stored in there and so the the sort of challenge here is like i i would like to have my clock speed run as fast as possible because if i can run at two gigahertz i can get twice as many operations done per per second than if i run at one gigahertz um but what that ends up meaning is that uh i'm very sensitive to the delay through this cloud of logic because uh any computation that is going to happen in here needs to sort finish before the next clock cycle hits right so uh a major point of sort of optimization on on any chip then is is to make is to sort of make uh this delay um delay from here uh uh as short as possible interesting and um is there ever because the constraint here seems to be that if you add too much logic then you might risk missing the clock cycle but if you don't add enough then you're you know leaving potential compute on the table um is there ever a situation where you're like you'd take a probabilistic chance that a compute computation finishes and or is it just like no either is going to finish my clock cycle or not yeah in standard chip design And you margin it such that, I mean, there is a probability, but it's like many, many standard deviations, like way standard deviations out such that for all intents and purposes, it is a reliable part.

  33. It will always meet the clock. There are some weird exceptions to that. There are clock domain crossings where you go from one clock to the other clock, and then you actually do have to reason about this probability. Interesting. In the main path, you margin it such that you'll get there like 25% of the clock cycle in advance. So it's very unlikely. In this, the clock, where the clocks synchronize, I guess, where the registers are, this is not something you determined as a chip designer. This is sort of just like an artifact of, hey, I want whatever sequence of logic. And then the software you use to convert your Verilog into the thing you send to TSMC, that just determines like hey in order to make this work you gotta kind of you gotta put a register here here and here to make sure that there's a there's no one step that is like too long such as it makes the whole clock cycle of the entire chip longer than it has to be yeah so this is actually a huge part of the work of designing a chip actually is is inserting them so it is done in a combination of manually and automatically um so i mean like just like to show the very sort of dumb version of like what you can do here you can take this logic and split it in half and so like say actually instead of just

  34. one cloud of logic i'm gonna um have two smaller clouds of logic um which do the same thing but split them up by a register right um feeding in like this um and this is like like if you split it like in the middle you can hit twice the clock frequency that's great you get twice the performance at the cost of this extra register. And so at the cost of some more storage. And so stepping back, why do we need to synchronize the whole chip? Like if you have like, if you imagine playing Factorio or something, there's no like global clock cycle. It's just shit is done when it's done. There's iron on the plate.

  35. You can take it if you want. Yeah. So taking that analogy, the thing that you need to be mindful of is if I've got two different paths through some logic. So I have to do a computation like F here and then computation G here and then they're going to come and meet for computation H somewhere here. And so there's going to be manufacturing variance here. In some chips, F will take a little longer. Maybe in some chips, G will take a little bit longer. And so if I've got some signal that's propagating through here and the result from F and G have to sort of meet up at H, the thing that can go wrong is that F can get there early and it meets like the previous value of G or the next value of G or something like that.

  36. And age needs to know when to start. Exactly. Like when has this next iteration of... And so this explains why different chips made at the same process node, the same like TSMC technology can have different clock cycles. Like two chips made at three nanometer might have different clock cycles based on whether they were able to optimize making sure that like there's no one critical path that is so long that it slows down the whole ship's clock cycle. That's right. This optimization that I showed here, this is just the sort of pipeline register insertion, it's called. Yeah. We've inserted in the middle of the pipeline or register here.

  37. This is a sort of pure trade-off

  38. Reiner Pope · 5 min

    “you can have really fast clock speed but you're not getting that much work done”

  39. Language models are starting to compete against the best human forecasters. I sat down with two senior Jane Streeters, Ron Minsky and Dan Pontecorvo, and asked, at some point, does AI just do what Jane Street does? There's a world that we should take seriously where we're going to build large language models or some other AI systems that are like strictly smarter than all humans on the planet and more capable at all cognitive tasks. Trading in particular feels to me as like kind of AGI complete, sort of like NP complete, because at the end of the day, trading involves figuring out what things are worth, which means making predictions about the future.

  40. Jane Street isn't betting against AI. They just signed a $6 billion compute deal. But Ron's view is that the edge keeps moving. I have never been more desperate to hire more engineers and more traders than I am today. You know, you have the usual thing of like the other hard parts that we don't yet know how to automate. Well, that ends up being where the competitive edge lies. You can find these open positions and watch the full interview at jainestreet.com slash Thoracash. Okay, so I remember talking to an FPGA engineer at Chain Street, Clark, who actually helped me prep for the previous interview.

  41. Reiner Pope · 7 min

    “the first fpga costs you ten thousand dollars whereas the first asic you make costs you 30 million dollars”

  42. If it has too many. But basically the lookup table is like a truth table. It's a truth table, yeah. And with a truth table, you can program in any gate you want. That's right, yeah.

  43. Reiner Pope · 5 min

    “using a LUT, I can also implement it, but it's going to take these 32 gates instead of three.”

  44. come in and go out. Why is it not a guarantee in CPUs? So you can actually design a CPU that has deterministic latency as well.

  45. here is the Scratchpad. So studying way back, people say computers have the quote unquote John von Neumann architecture,

  46. where there's this serial processing of information. And maybe just because we've been talking about parallel accelerators, but I just don't, like, the FPGA is super parallel. The kinds of AI accelerators, TPUs are super parallel. Even CPUs are super parallel, if you think about all the cores they have. And so is it actually, like, in what sense is modern hardware actually the... on Neumann architecture. Is that actually a fair way to describe modern hardware? I think it's a fair way to describe CPUs. Like just the amount of parallelism, like on a CPU, the amount of parallelism you get is about a hundred cores times maybe like 16 way vector unit.

  47. So 106, about a thousand way parallelism on a CPU. Yeah, one question is what is the, there is a die that is being used for the CPU. And if there's fewer threads, just as a matter of like transistor uh voltages are like switching on and off

  48. Reiner Pope · 4 min

    “And so stripping a lot of that out as well as sort of making these register files tighter in a sense is driving a lot of where the GPU gains.”

  49. So if I think about how the brain works versus what you're describing here, at a high level, the differences might be that while you can do structured sparsity in these accelerators and then save yourself some area that you would have otherwise had to dedicate to these gates, in the brain, there's unstructured sparsity. You know, any neuron can connect to any other neuron and not in like ways where they'd be column lined or whatever. Then there's the fact that memory and computer co-located i guess you could say in a way the memory computer co-located on this is exactly the co-location in some sense of the that's right that's right yeah yes maybe that actually isn't a big difference and the other maybe a big a big difference is that the clock cycle on the brain is much slower than on um on computers and partly that's to preserve energy because the faster the clock cycle, the bigger the voltage needs to be in order to identify for the signal to settle and to identify what

  50. state of transistor is that. I don't know if you have other high-level takes about how any commentary on what the brain might be doing versus how these chips work. So let's take the clock speed one first, actually. Yeah.

  51. Reiner Pope · 2 min

    “Most of the energy consumption actually comes from just the charging and discharging of like toggling from zero to one and back to zero.”

  52. What is the difference at high level between how a GPU and a TPU work? Yeah. So, I mean, I think there's sort of a high level organization principle that is different. Um, and then there's sort of inside the cores what are different, but we'll look sort of, uh, outside the, uh, like at the high level. Um, so we'll take a GPU, um, and a TPU.

  53. and what does like sort of the top level block structure look like um if you think of this as the whole chip um in each case um the organization of of the gpu um uh is mostly a bunch of uh almost identical units which are these um these are the sms um and then they've got a an l2 memory in the middle and then a bunch more of these sms on the bottom um and so uh there's sort of this fairly regular grid of cores um uh and then like if we look at a tpu in uh in comparison um you uh you end up with much coarser grained units of uh logic and so you you end up with something like um uh some large number of um maybe like maybe just a few matrix units these are the these are the big like systolic arrays and then in the middle you've got some vector unit and then you've got your matrix units at the bottom so now sort of like matrix units with a vector unit in the middle sort of this is the whole TPU chip you can sort of think of scaling this thing down into a really tiny unit with a smaller matrix unit, smaller vector unit. And that is sort of what an SM is. So sort of at a very high level point of view, the GPU has a lot of tiny, tiny TPUs sort of tiled across the whole chip.

  54. Oh, interesting. So like you're suggesting the tensor core within a streaming SM is analogous to an MXU. Yeah, it's very, very similar. Yeah. I see. And so if you had more lack of structure, having a bunch of tiny TPUs makes a lot of sense. Whereas if you kind of just have huge matrix multiplications, you're like, why don't we avoid the cost of having the individual SMs with their own registers and warp schedulers and things like that? Why don't we just make a huge thing and amortize those costs across the whole thing? And I mean, I think this shows up in how large you can grow things. We've sort of seen this theme, like, especially with a systolic array, where larger systolic array amortizes the register file costs better.

  55. This sort of design allows you to have larger systolic arrays, whereas the sort of GPU design constrains you to having small units of everything. There is a trade-off, however. There ends up being, because of this sort of coarse-grained separation of things there, you need to move a lot of data from the vector unit to the matrix units. And so like you need to move a lot of data through a sort of like two lines of perimeter here. Whereas if you sort of look at the equivalent thing here, you've got vector units everywhere and you need to move data through this line, through this line, through this line, through this line, through this line.

  56. So the amount of data you can move between a vector unit and a matrix unit is actually much higher in a GPU than in a TPU because instead of having to move all the data through these just two lines, you're moving all these data through like 16 lines or something of wiring instead in a GPU. Right, but also you might have to move across less area. Which, I mean, is also a saving. It's an energy saving. That's right, yeah. So data ends up moving, like, if you can operate entirely within an SM, the data movement is much smaller. But then the moment you want to operate across SMs, like, it becomes sort of more complicated and expensive.

  57. So you don't have a comment, but one might expect that a thing Maddox might try to do is to get the GPU-like smaller structure of systolic arrays surrounded by SRAM, but also at the same time make it so that the things you need in an SM to support the CUDA architecture, but take a bunch of space, you might discard. Yeah. We've talked publicly about something which we call a splittable systolic array, which is sort of, in some sense, you can think of as like big systolic arrays that can be small systolic arrays as well. Cool. Okay, I think that's a good note to close on. Reiner, thank you so much.

  58. Thanks, Rakesh.

More interviews