SAITPublic / PIMSimulator

Processing-In-Memory (PIM) Simulator
Other
83 stars 34 forks source link

Activation of PIM engines #13

Closed Arash1381-y closed 1 week ago

Arash1381-y commented 1 week ago

Hello there,

I wanted to ensure that I understand the concept of HBM2 PIM correctly or not.

The memory controller of this memory does not change regardless of whether there is a PIM engine or not. In this case, the write/read command to a specific location of the memory, let's say some row which presents a PIM engine, activates the PIM engine to perform an operation like addition, multiplication, or something else. From the README.md, we know that we can have operations like addition that can use BANK rows as operands, and also the instructions that are written into these PIM engines (CRF) are in 32-bit RISC style. Based on the fact that these 32 bits are not enough for addressing bank rows, there must be a mechanism for addressing these bank rows for operations. What I gathered from the paper and the code is that this address is sent by the memory controller.

In conclusion:

  1. We perform write/read operations to a specific location of memory to utilize PIM.
  2. CRF data is used for decoding the operation types and the arithmetic operations, etc.
  3. If we need to access a bank for an operation, then, besides the CRF, there is a packet that contains this address.

Am I correct?

iamshcha commented 1 week ago
  1. You can use data from any area of the BANK as an operand to operate PIM.
  2. Yes. The PIM commands (PIM ISA format) are loaded to CRF. Refet to README (https://github.com/SAITPublic/PIMSimulator?tab=readme-ov-file#23-pim-instruction-set-architecture)
  3. In PIM mode, all memory commands must go through the CRF, and execute the PIM commands in the CRF. The bank address of a memory command can be used as operands and, at the same time, the data of the register index decoded from the CRF can be used as an operand.