跳到主内容
@wquguru
精选70Hacker News Best(web_list)行业动态

三星 LPDDR5X-PIM 存内计算亮相 Hot Chips 2026

三星 PIM 存内计算亮相 Hot Chips 2026

原文
发到 X

Hot Chips 2026: Samsung’s Processing-in-Memory (PIM)

Hot Chips 2026:三星的内存内处理(PIM)

In-memory compute with LPDDR5X

采用LPDDR5X的内存内计算

Chester Lam

Chester Lam

Aug 29, 2026

2026年8月29日

25

25

2

2

1

1

Share

分享

In-memory compute has been an attractive proposition for many years because compute within a memory chip can exploit its higher internal bandwidth. Additionally, in-memory compute avoids the long latency path between DRAM and traditional compute cores. At Hot Chips 2026, Samsung discusses their continued pursuit of in-memory compute with their PIM (Processing-in-Memory) push. They’re implementing MAC units within LPDDR5X chips, while preserving the chip’s ability to interface with a standard memory controller.

内存内计算多年来一直是一个有吸引力的提议,因为内存芯片内的计算可以利用其更高的内部带宽。此外,内存内计算避免了DRAM与传统计算核心之间的长延迟路径。在Hot Chips 2026上,三星讨论了其通过PIM(内存内处理)推动持续追求内存内计算的努力。他们在LPDDR5X芯片内实现了MAC单元,同时保留了芯片与标准内存控制器接口的能力。

DRAM chips are internally divided into banks, each with their own read and write logic. During a normal DRAM access, the memory controller selects a bank, activates a row within it, and then accesses data via column access strobe (CAS) commands. Bandwidth is limited by the chip’s external DRAM interface. Even if the memory controller could activate all of the banks simultaneously, it wouldn’t be able to get its hands the full bandwidth available across all the banks.

DRAM芯片内部划分为多个存储体,每个存储体有自己的读写逻辑。在正常的DRAM访问中,内存控制器选择一个存储体,激活其中的一行,然后通过列访问选通(CAS)命令访问数据。带宽受限于芯片的外部DRAM接口。即使内存控制器能够同时激活所有存储体,它也无法获得所有存储体可用的全部带宽。

Samsung’s LPDDR5X-PIM is like a normal LPDDR5X-9600 chip with 16 banks, but places a PIM (Processing-in-Memory) block at each bank. These PIM blocks access their attached DRAM bank without being constrained by the chip’s external bus. Together, they can utilize the chip’s internal bandwidth across all 16 banks, which comes out to 614 GB/s. For comparison, regular DRAM accesses can hit two banks in parallel and max out at 76.8 GB/s.

三星的LPDDR5X-PIM就像一个普通的LPDDR5X-9600芯片,具有16个存储体,但在每个存储体处放置了一个PIM(内存内处理)块。这些PIM块访问其附着的DRAM存储体,而不受芯片外部总线的限制。它们共同可以利用芯片内部所有16个存储体的带宽,总计达到614 GB/s。相比之下,常规DRAM访问可以并行访问两个存储体,最大带宽为76.8 GB/s。

PIM blocks internally consist of a MAC tree with surrounding register files and control logic. A 1024-bit instruction register file holds up to 64 16-bit instructions. A 4 kbit source register file is meant for activation vectors, and supplies one source operand for the MAC array. Samsung expects software to load model weights into DRAM, so the attached DRAM block supplies the second operand. Model weights can be scaled before the MAC computation, with scale factors coming from a 2 kbit scale register.

PIM块内部由MAC树及其周围的寄存器文件和控制逻辑组成。一个1024位指令寄存器文件可容纳多达64条16位指令。一个4 kbit源寄存器文件用于激活向量,并为MAC阵列提供一个源操作数。三星期望软件将模型权重加载到DRAM中,因此附着的DRAM块提供第二个操作数。模型权重可以在MAC计算之前进行缩放,缩放因子来自一个2 kbit的缩放寄存器。

The PIM block’s MAC array supports a variety of low precision formats. Numbers from Samsung’s presentation suggest each PIM block’s MAC array can sustain four INT8 or FP8 MAC operations per data clock, or eight per cycle when not counting the double data rate. Throughput doubles for 4-bit input weights, bringing package-wide compute throughput to 2.4 TOPS.

PIM块的MAC阵列支持多种低精度格式。三星演示文稿中的数字表明,每个PIM块的MAC阵列可以在每个数据时钟周期内执行四次INT8或FP8 MAC操作,或者在不计算双倍数据速率时每个周期执行八次。对于4位输入权重,吞吐量翻倍,使整个封装的计算吞吐量达到2.4 TOPS。

This isn’t a very high figure, but an implementation with many LPDDR5X chips will have higher aggregate throughput. For example, eight LPDDR5X chips together would have 9.6 INT8 TOPS, which just about matches the NPU in Intel’s Meteor Lake. That would also be an expensive setup, because eight 16 GB LPDDR5X chips would correspond to 128 GB of system memory.

这个数字并不高,但一个包含许多LPDDR5X芯片的实现将具有更高的总吞吐量。例如,八个LPDDR5X芯片组合起来将提供9.6 INT8 TOPS,这几乎与英特尔Meteor Lake中的NPU相匹配。那也将是一个昂贵的配置,因为八个16 GB的LPDDR5X芯片将对应128 GB的系统内存。

Accessing Compute with Standard DDR Commands

使用标准DDR命令访问计算

One highlight of LPDDR5X-PIM is that it stays within the standard LPDDR5X protocol while exposing compute capabilities that aren’t part of the memory standard. Samsung achieves this by setting aside special row addresses, which act like MMIO addresses of sorts. Each channel has a pair of predefined rows for mode control. Activating one of those rows sets the chip to single-bank mode, while the other sets the chip to multi-bank mode. Single-bank is the regular mode, while multi-bank applies commands across all 16 banks to exploit the chip’s internal bandwidth.

LPDDR5X-PIM的一个亮点是,它保持在标准LPDDR5X协议内,同时暴露了不属于内存标准的计算能力。三星通过预留特殊的行地址来实现这一点,这些地址类似于某种MMIO地址。每个通道都有一对预定义的行用于模式控制。激活其中一行将芯片设置为单存储体模式,而另一行则将芯片设置为多存储体模式。单存储体是常规模式,而多存储体模式则将命令应用于所有16个存储体,以利用芯片的内部带宽。

Special per-bank rows change how read and write commands behave. Activating one of these special rows makes read and write commands access PIM registers instead of regular DRAM bank contents (PIM Registers Activated mode). Samsung envisions a ML use case where software loads model weights into DRAM while the chip is in normal single-bank mode. Then, software switches into multi-bank mode and enters PIM Registers Activated mode. This lets code write activation values into PIM source registers, set scale factors in PIM scale registers, and specify an operation that’s filled into PIM instruction registers.

特殊的每存储体行改变了读写命令的行为。激活这些特殊行之一会使读写命令访问PIM寄存器,而不是常规的DRAM存储体内容(PIM寄存器激活模式)。三星设想了一种机器学习用例,其中软件在芯片处于正常单存储体模式时将模型权重加载到DRAM中。然后,软件切换到多存储体模式并进入PIM寄存器激活模式。这允许代码将激活值写入PIM源寄存器,在PIM缩放寄存器中设置缩放因子,并指定填充到PIM指令寄存器中的操作。

Because the chip is in multi-bank mode, each PIM register write gets broadcast across all 16 banks. PIM compute therefore works like a very constrained SIMD processor, where the operation, scale factor, and one source operand are the same across all banks. Samsung does allow writing PIM registers in single-bank mode, but that functionality is meant for debugging purposes. Each DRAM packet is 256 bits (BL=16) Filling each source register takes 16 write commands. Doing that one bank at a time across each of the 16 banks would mean 256 write commands, turning host to PIM register write bandwidth into the limiting factor.

由于芯片处于多存储体模式,每次PIM寄存器写入都会广播到所有16个存储体。因此,PIM计算就像一个非常受限的SIMD处理器,其中操作、缩放因子和一个源操作数在所有存储体中都是相同的。三星确实允许在单存储体模式下写入PIM寄存器,但该功能用于调试目的。每个DRAM数据包为256位(BL=16),填充每个源寄存器需要16次写命令。一次一个存储体地跨16个存储体执行此操作将意味着256次写命令,使主机到PIM寄存器的写入带宽成为限制因素。

After priming PIM registers, software switches back into multi-bank mode and issues read commands. Instead of reading DRAM contents, these read commands initiate computations and get results accumulated into PIM vector register files. Then, write commands tell PIM blocks to write VRF contents back into the DRAM banks.

在初始化PIM寄存器后,软件切换回多存储体模式并发出读取命令。这些读取命令并非读取DRAM内容,而是启动计算并将结果累积到PIM向量寄存器文件中。随后,写入命令指示PIM块将VRF内容写回DRAM存储体。

PIM has to handle reordering that a normal memory controller might carry out. When code sets up PIM by activating the bank, PIM conventionally sets up its instruction register files so that instructions sequentially access each source register element. For instance, the first instruction would reference the first source register element, the second instruction would reference the second source register element, and so on. However, that falls apart if the memory controller reorders accesses. Samsung gets around this with an Address Align Mode (AAM), which makes each instruction infer its source register index from the column address being accessed.

PIM必须处理普通内存控制器可能进行的重排序。当代码通过激活存储体来设置PIM时,PIM通常设置其指令寄存器文件,使指令顺序访问每个源寄存器元素。例如,第一条指令引用第一个源寄存器元素,第二条指令引用第二个源寄存器元素,依此类推。然而,如果内存控制器重排序访问,这种机制就会失效。三星通过地址对齐模式(AAM)解决此问题,该模式使每条指令根据所访问的列地址推断其源寄存器索引。

When the host finishes using in-memory compute and wants to read results, it switches the DRAM chip back into single-bank mode. Then, regular DRAM reads and writes will start accessing DRAM contents as normal.

当主机完成内存计算的使用并希望读取结果时,它将DRAM芯片切换回单存储体模式。然后,常规的DRAM读写将像正常情况一样访问DRAM内容。

Software Headaches?

软件难题?

Samsung internally achieved huge performance gains when taking advantage of LPDDR5X-PIM, compared to using standard LPDDR5X. The chip’s ability to operate with a standard memory controller is impressive, and Samsung has been very creative in how they approached the problem.

三星内部在利用LPDDR5X-PIM时,相比使用标准LPDDR5X取得了巨大的性能提升。该芯片能够与标准内存控制器协同工作,令人印象深刻,三星在处理这个问题上展现了极大的创造力。

Repurposing standard DRAM commands should simplify hardware, but software challenges look steep. Because PIM modes change the meaning of DRAM access commands, software can’t use PIM and carry out regular memory accesses at the same time. That applies even across threads, because memory controllers and DRAM chips are oblivious to what thread an access is for. If a non-PIM thread reads from memory while another is using PIM, the first thread could cause an unintended computation and get incorrect results into the PIM VRFs. A write from the non-PIM thread could cause PIM blocks to write VRF data back to the wrong address.

重新利用标准DRAM命令应简化硬件,但软件挑战看起来相当严峻。由于PIM模式改变了DRAM访问命令的含义,软件无法同时使用PIM和进行常规内存访问。这甚至适用于跨线程场景,因为内存控制器和DRAM芯片不关心访问属于哪个线程。如果非PIM线程在另一个线程使用PIM时从内存读取,第一个线程可能导致意外计算并将错误结果放入PIM VRF中。非PIM线程的写入可能导致PIM块将VRF数据写回错误地址。

Samsung deals with this by having the host isolate a PIM region in memory. I can’t think of an easy way to do this in a typical system without compromising memory bandwidth and PIM performance. Hardware normally interleaves addresses across channels, which lets common access patterns naturally utilize bandwidth across those channels. PIM uses per-channel rows to control single/multi-bank mode changes, so dropping interleaving and designating memory channels as PIM-only would be the only reasonable way to create a PIM region. Then, non-PIM applications wouldn’t be able to take advantage of bandwidth from channels reserved for PIM. PIM code would miss out on bandwidth and compute from non-PIM channels. The latter could be a significant issue because per-chip compute throughput isn’t that high.

三星通过让主机在内存中隔离一个PIM区域来解决这个问题。在典型系统中,我想不到一种简单的方法来做到这一点,同时又不牺牲内存带宽和PIM性能。硬件通常会在通道间交错分配地址,这使得常见的访问模式能够自然地利用这些通道的带宽。PIM使用每通道的行来控制单/多银行模式切换,因此,取消交错并将内存通道指定为仅PIM将是创建PIM区域的唯一合理方式。然后,非PIM应用程序将无法利用为PIM保留的通道的带宽。PIM代码则会错过非PIM通道的带宽和计算能力。后者可能是一个重大问题,因为每芯片的计算吞吐量并不高。

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

相似阅读

另一事件,读法相近