4 ms·
GPU architecture newbie here. Why isn't the memory interwoven with the cores, so you have faster local access and more streamlike data flow like in a systolic a
by amelius 6y ago
GPU architecture newbie here. Why isn't the memory interwoven with the cores, so you have faster local access and more streamlike data flow like in a systolic array?
- p_l 6y agoBecause you want to use COTS chips for memory. Cost of interleaving memory and compute is huge, and only gets worse when you consider the fact that such memory is "locked" to particular product. So the only interleaved memory is very small caches local to the compute cores. (And I'm not even getting into power and thermals involved)
- NotCamelCase 6y agoWhy aren't there e.g. 16 GB of L1D$ inside our CPUs? It'd be blazingly fast! :) Although memory access patterns of typical GPU workloads are very different than those of CPU workloads, there are GPU-local, hierarchical caches similar to CPUs for different purposes that are exclusive to shader cores/computation units, which can be even partitioned dynamically. The struggle on the GPU side is keeping all the cores busy while servicing memory requests efficiently. Sharing memory across small group of threads run in lockstep, for example, is a great way of doing it.
- amelius 6y ago> Why aren't there e.g. 16 GB of L1D$ inside our CPUs? It'd be blazingly fast! :) I didn't say the memory necessarily has to be moved into the GPU. The other way around would also be a possibility.
- NotCamelCase 6y agoYep, that's not what I intended to hint at, either. What I mean is, it boils down to the familiar problem of diminishing returns to have huge caches inside GPUs.
- jabl 6y agoI'm not an expert in this area, but my understanding is that DRAM and logic processes are very different from each other. If you want both DRAM and logic on the same chip you'll end up with a compromise which isn't that good for either. Which, aside from the programmability issue, is why processor-in-memory (PIM) approaches haven't caught on (yet). Latest generation high end GPU's use HBM2(E?) memory, which is a very wide and fast pipe compared to DDR4 used for "normal" CPU main memory. As for systolic arrays, to some extent the matrix-matrix units in Google TPU's and NVIDIA Tensor Cores are systolic arrays. I suspect we'll see designs go further down that path in the future.
- imtringued 6y agoIf you are interested in a PIM (Processing in Memory) solution then you should take a loot at something like UPMEM instead of GPUs. It's expensive to manufacture and the processors can only access local memory (64MB of RAM) but in exchange you get 128 DPUs (CPU cores) per DIMM and each DIMM has an internal memory bandwidth of 128GB/s. With a really high end multisocket CPU system you might see 200GB/s for the entire system.
- raphlinus 6y agoThere is threadgroup shared memory (also known as local data share), provided at 64kB per block of execution units (this block is called a "subslice" in Intel, a "streaming multiprocessor" in Nvidia, and "compute unit" in AMD). Though the exact ratios vary widely, this memory has about an order of magnitude higher bandwidth and lower latency than access to global memory, and when used skillfully really can enable systolic-like architectures.