Samsung's Processing-in-Memory (PIM)
21–30 of 120 posts
Re: Samsung's Processing-in-Memory (PIM)
#22I wrote up a theoretical post here about LMM performance of a MacBook Pro with PIM memory: https://ben3d.ca/blog/m5-max-samsung-lpddr5-pim-650-tokens-p...
Re: Samsung's Processing-in-Memory (PIM)
#23In-memory computation was already possible with regular DRAM: https://news.ycombinator.com/item?id=22712811 Add a new set of CPU instructions like “rep macb” ...and it's been long enough now, that I can say there was an effort to implement this on standard x86 memory controllers and have the existing string instructions do so, back in the days of SDR SDRAM, but the tradeoffs weren't (yet) in favour.
Re: Samsung's Processing-in-Memory (PIM)
#24So how big are these banks? If you can’t fit the weights of a layer into one bank then presumably you lose a lot of the speed gains.
Re: Samsung's Processing-in-Memory (PIM)
#25Matrix multiplication involves getting every entry of the input and output matrices to be at the same multiplier at the same time. (Ie. N^2).
To do that, a lot of data movement needs to happen. Movement is the main thing - the multiplication and addition is a sideshow as far as energy and silicon space is concerned. You need a 'around the chip' ring shift register to pass every element of one matrix past every element of the other.
Re: Samsung's Processing-in-Memory (PIM)
#26“ Each PIM block only has fast access to its locally attached DRAM bank. All other input data has to be brought in through the DRAM chip’s comparatively constrained external interface. PIM blocks can’t directly exchange data with each other, so the host has to move data using regular DRAM reads and writes if one PIM block needs to use results generated by another.” So how big are these banks? If you can’t fit the wei…
Re: Samsung's Processing-in-Memory (PIM)
#27Re: Samsung's Processing-in-Memory (PIM)
#28“ Each PIM block only has fast access to its locally attached DRAM bank. All other input data has to be brought in through the DRAM chip’s comparatively constrained external interface. PIM blocks can’t directly exchange data with each other, so the host has to move data using regular DRAM reads and writes if one PIM block needs to use results generated by another.” So how big are these banks? If you can’t fit the wei…
The reason is quite simple. You can split the matrix along both dimensions so you just tile it into 64x64 or whatever fits into the bank and just fill it up. The biggest problem is load balancing the tiles across all banks for maximum parallelism.
For GEMM I believe there is no point in doing PIM, you are better off with a GPU or NPU.