Hacker News
Processing in Memory: DRAM Is About to Do Math
roadbuster
|next
[-]
The designers of HBM5 had the same observations and thought, "why don't we put a logic chip at the bottom of the stack of HBM DRAM chips and get extremely high memory bandwidth?" But, in looking at this, you'll also quickly realize this is almost exactly what Intel and Micron pitched 15 years ago as Hybrid Memory Cube** (which lost on the market compared to the simpler, less costly, and more flexible alternative, HBM)
* https://www.eecg.toronto.edu/~stumm/Theses/Elliott-PhD98.pdf
snailmailman
|root
|parent
|next
[-]
Although I’m sure it’s quite different. The cpu and memory hardware is so completely different. And basic bit manipulation is hardly computation.
hn_acc1
|root
|parent
|next
|previous
[-]
timcobb
|root
|parent
|previous
[-]
Bratmon
|root
|parent
[-]
schaefer
|root
|parent
|next
[-]
jcranmer
|next
|previous
[-]
One of the problems with trying to move a lot of ALUs close to the DRAM logic is that ALUs are pretty hot, and DRAM is some of the most sensitive components to heat. There are some other issues too, like the process manufacturing differences mentioned by a sibling comment.
honr
|next
|previous
[-]
MBCook
|next
|previous
[-]
And if we fund a different set of operations actually work better for AI you can’t adjust to that either.
Seems extremely limited. But otherwise wouldn’t you just end up with something like a massive number of tiny microcontrollers each accessing a set of memory? The Transputer again.
senshan
|next
|previous
[-]
StilesCrisis
|next
|previous
[-]
peter_d_sherman
|next
|previous
[-]
Related:
"SIMDRAM: A Framework for Bit-Serial SIMD Processing Using DRAM Extended Abstract" (2020):
https://arxiv.org/html/2012.11890v1
>"We leverage the SIMDRAM framework to accelerate seven application kernels from machine learning, databases, and image processing (VGG-13 [63], VGG-16 [63], LeNET [38], kNN [42], TPC-H [66], BitWeaving [45], Brightness [28]). SIMDRAM provides up to 2.5× speedup for the kernels compared to Ambit [58]. Compared to a CPU and a high-end GPU, SIMDRAM is 257× and 31× more energy efficient, while providing 93 × and 6× higher throughput, respectively."
wtallis
|root
|parent
[-]
petra
|root
|parent
|next
[-]
I would be more expensive, but maybe the performance would be worth it.
peter_d_sherman
|root
|parent
|previous
[-]
That is, Modern CPU's (as opposed to truly ancient ones, around 50 or more years ago) implement caches -- regions of gates/circuits/transistors or mostly transistors -- which implement the equivalent of RAM.
When a silicon wafer specifically destined to become a stick of consumer RAM is etched, most of its space is etched in a gate/circuit/transistor (or mostly transistor!) pattern that implements RAM.
There may be other timing/coordination/refresh etc. circuits etched on the region of the silicon wafer which is to become the RAM, but those are usually a small portion of the space.
But, fundamentally CPU's and RAM -- are created from the same substrate, transistors and other very small electronic components etched into a silicon wafer, although these days due to manufacturing constraints and cost issues, RAM usually uses a larger process node, a larger (less expensive, older) size, i.e., the latest CPU might use 2nm process, and consumer RAM might use 10nm or 12nm process.
But, fundamentally, at the lowest level, both RAM and CPU are mostly transistors and other minature electronic components.
So, if they're both the same at that level (ignoring process node size), then my engineering question to you is as follows:
Why exactly can a CPU contain RAM electronic circuitry, but RAM can't contain CPU electronic circuitry, if both, at the lowest level, the level of the minaturized transistor, the minaturized electronic circuit, are created from the same substrate, the same basic building blocks?
>You seem to think that "compute in memory" would mean the disappearance of commodity DRAM parts and their replacement with parts that had compute capabilities.
You seem to imply that I think that, but I am merely speculating on possible futures, possible outcomes...
>This is impossible.
That might be speculation on your part...
>Nobody is going to be putting compute in memory chips onto standard consumer DIMMs.
That also might be speculation on your part...
Seymour Cray was heralded as a genius back in time in computer history, because he put memory physically closer to the CPU. Since his time, compute and memory have been getting closer and closer together, in various forms, including, but not limited to CPU caches, or say, 64GB HBM on Intel Xeon Max 9480... Cerebras, for example, mixes as much memory and compute as they can, on the same wafer...
But historically, memory and compute have been getting closer and closer together... that's because higher performance (which is the goal, the continual holy grail of the computing industry) typically requires less space, less latency, less delay, between the two...
Is putting a CPU or other processing unit/computing device/computing circuitry into a stick of DRAM a good idea?
Well, that I don't know, but the industry, always in search of better performance, might head that way, in whole or in part, in the future... we don't as-of-yet-know...
wtallis
|root
|parent
|next
[-]
The problem with your rambling and speculation is that you're not making any attempt to think about what conditions would be necessary for a technology to succeed in the market and gain widespread adoption across many market segments. I stand by my assertion that it is impossible for compute-in-memory chips to entirely replace commodity DRAM, especially in any market segment where the compute portion of those memory chips is not critically valuable. Any remotely plausible, useful compute-in-memory design will have significantly lower capacity and higher cost than pure commodity DRAM; this is not a low-overhead added feature. Any market segment where the compute capabilities of compute-in-memory were so marginally valuable that a non-trivial number of the customers wanted to disable the compute is a market segment where everybody would still be buying mostly ordinary DRAM.
jcranmer
|root
|parent
|previous
[-]
There's different kinds of RAM. CPUs are using SRAM for their caches (which usually have ~6 transistors per bit cell, IIRC, although I'm not a hardware guy, so take this stuff with a grain of salt). Your RAM sticks are using DRAM, which are 1 transistor and one capacitor per bit cell.
Now, this is where my understanding of the actual physical issues really gets sketchy, but the processes that are good at making the CPUs just aren't good at making DRAM, and vice versa. (I would guess that it has specifically to do with the capacitor, but that's purely a guess.) SRAM isn't a problem for the CPU processes, because SRAM cells are closer to the other kind of logic you set up in CPUs.
RetroTechie
|next
|previous
[-]
MadnessASAP
|root
|parent
|next
[-]
General purpose workloads would require much more silicon real estate and are not (typically) nearly as bandwidth hungry. Just like not all CPU workloads benefit from being adapted to a GPU, even fewer will benefit from being adapted to processing in RAM.
Lerc
|root
|parent
[-]
Not all algorithms can be converted of course, but a lot of that is because there are some inherently unparallelizable problems.
ghaff
|root
|parent
|previous
[-]
jmalicki
|root
|parent
[-]
api
|next
|previous
[-]
Or integrated flash with TPUs? That would be awesome. Flash your model onto a model-processor and run it.
wtallis
|root
|parent
[-]
sroussey
|root
|parent
|next
[-]
wtallis
|root
|parent
[-]
The drastically different scaling trends for logic and SRAM on the same die are important, but I'm not sure how relevant it is to LLM inference. Cerebras has already shown that the amount of SRAM you can get out of a wafer is an absolute pittance compared to what frontier LLMs require; a multi-million dollar machine with ~40GB of SRAM is not a good solution for big LLMs no matter how fast it may be for small models. Denser forms of memory are almost mandatory for doing LLM inference on the largest models, and it seems pretty clear that the most cost-effective architectures we can build today for LLM inference would not be dominated by SRAM. You'll still have SRAM caches, but it doesn't make sense as the primary storage for the entire model's weights.