How Do We Verify Processing-in-Memory Simulators?

This study develops a protocol to check output correctness and interpret the logs of uPIMulator and Downmem, using a common vector-addition setup for the UPMEM architecture.

AI-generated conceptual illustration of two simulators and an independent reference used to examine outputs; not a photograph of experimental hardware.
AI-generated conceptual illustration: two simulators and an independent reference for checking outputs.

Two simulators can produce the same numerical result while the figures in their reports refer to different operations. A meaningful comparison therefore begins with two questions: Is the computation correct? What does each recorded value represent? This study develops a protocol that addresses both questions by checking outputs against an independent reference calculation and examining the recorded events and the limits of comparison.

Why Bring Computation Closer to Memory?

In conventional computers, data is stored in memory while the processor performs computations on it. In data-intensive applications, moving data between the processor and memory can affect execution time and energy consumption. Processing-in-memory approaches therefore aim to perform some computation closer to where the data resides, reducing the need for repeated data movement. [1]

One example is the UPMEM architecture, which integrates small processing units with memory on the same chip. Computational tasks can then be distributed to those units and performed on locally stored data. The PrIM benchmark suite provides a set of applications for studying this architecture. [1]

Software simulators help researchers study the behavior of these systems, test their programs, and explore design choices. This study focuses on uPIMulator and Downmem, and on the conditions needed to interpret comparisons between their outputs and logs accurately. [2] [3]

When Is a Comparison Between Simulators Meaningful?

Running an application with the same name on two simulators is not enough, by itself, to explain differences in the figures they report. The simulators may initialize data differently, extract outputs through different paths, or record different sets of operations. Interpreting a difference therefore requires knowing what each path computed and what it recorded.

The study therefore separates two aspects of verification: output correctness and event interpretation. First, does the output extracted from each simulator match the result of an independent reference calculation? Second, do the reported figures describe operations that can be compared directly, or do they cover different regions and serve different purposes? This distinction provides a basis for interpreting the figures before using them to compare performance.

A Simple Experiment: Element-Wise Vector Addition

The study starts with vector addition from the PrIM benchmark suite. Here, a vector is an ordered list of numbers. Each element in the first vector is added to the element at the same position in the second vector to produce the output vector. The following four-element example illustrates the operation. [1]

Table 1. A simple example of element-wise vector addition.
PositionVector AVector BOutput C
First235
Second549
Third167
Fourth7815

Illustrative example. Each vector in the study configuration contains 1024 elements.

In the study configuration, each vector contains 1024 signed 32-bit integers (int32), with the allowed value range restricted to prevent signed overflow during addition. Each element occupies four bytes, giving a vector size of 4096 bytes. The operation runs on one in-memory processing unit, called a DPU, using 16 execution threads, known as tasklets. These settings, the tool versions, and the data representation are fixed to define the scope of the comparison.

How Do We Check Output Correctness?

The protocol uses an independent reference calculation to obtain the expected result outside the simulators. The output from each simulator is then checked against that result separately. This matters because agreement between two programs does not, by itself, establish correctness: both could share the same error.

An independent deterministic input generator makes it possible to reproduce the same inputs when an experiment is repeated. The selection rules require each transformation to change the inputs, whether the vectors are swapped or their element order is reversed. This avoids repeating an unchanged case because of symmetric data.

In the protocol shown here, the reference result is calculated from the original vectors A and B. In the reversal case, the element order in both inputs is reversed before execution. After extraction, the output is restored to the original element order and compared with the same reference result. All comparisons therefore use a common order. The protocol defines three test cases for each simulator:

Table 2. Functional verification cases in the study configuration.
Test caseApplied changeWhat is checked
BaselineUse both vectors in their original order.The extracted output matches the reference result byte for byte.
Swap operandsSwap vectors A and B.The output still matches the reference, as required by the commutative property of addition.
Reverse element orderReverse the element order in both inputs, then restore the extracted output to the original order.The expected relationship holds after restoring element order, helping to detect some indexing or data-location errors.

The plan comprises six runs in this configuration: three per simulator. Any experimental conclusion is limited to these cases and settings. The protocol's ability to detect particular types of errors will be assessed through additional controlled tests.

A flowchart starts with the common original inputs. One branch feeds the independent reference calculation, while the test cases feed the two simulators. Simulator outputs are extracted, and the original element order is restored in the reversal case before comparison with the reference. Recorded simulator events follow a separate path for interpretation of their meaning and scope. Both paths lead to a verification report that states the limits of comparison.
Figure 1. The protocol checks outputs against an independent reference calculation and separately examines the meaning and scope of recorded events, then documents the outcome and the limits of comparison.
Enlarge diagram
A flowchart starts with the common original inputs. One branch feeds the independent reference calculation, while the test cases feed the two simulators. Simulator outputs are extracted, and the original element order is restored in the reversal case before comparison with the reference. Recorded simulator events follow a separate path for interpretation of their meaning and scope. Both paths lead to a verification report that states the limits of comparison.

Why Do We Also Examine What the Logs Mean?

The output vector to be checked can be the same even when the operations used to obtain it differ. The vector-addition path selected for this study illustrates this distinction. In the Python/C++ version of uPIMulator, an internal verification read covers a contiguous region containing the first vector and the output vector; the result overwrites the second vector's region after addition. [4] The adapter used in this study for Downmem performs output readback to the host in the simulation, retrieving only the output region.

With one DPU and 1024 elements of four bytes each, the comparison is as follows:

Table 3. Read and readback regions in the two paths selected for comparison.
Comparison pointuPIMulator — Specified Python/C++ pathDownmem — Adapter used in this study
Purpose of the operationInternal verification read.Output readback to the host in the simulation.
Data region accessedVector A and output vector C.Output vector C only.
Region size in this configuration8192 bytes.4096 bytes.
Output size compared with the independent reference4096 bytes.4096 bytes.

Source — uPIMulator: the pinned source code. [4] Downmem: the configuration of the adapter used in this study.

The output to be checked is therefore the same size in both paths: 4096 bytes. What differs is the region covered by the operation that makes the output available. The protocol keeps output correctness separate from event interpretation. The difference in region size alone is not treated as a difference in transfer efficiency; the purpose, scope, and measurement boundaries of each operation must also be examined.

Two panels compare the regions read after vector addition. The specified Python/C++ path in uPIMulator reads a total of 8192 bytes containing vector A and output vector C. The study protocol extracts the 4096-byte output vector for comparison with the independent reference. The second panel shows the 4096-byte output region read back to the host in the simulation by the Downmem adapter used in this study. The output vector is shown at the same visual scale in both panels.
Figure 2. The region covered by the internal verification read in uPIMulator's pinned path [4] and the output readback region used by the Downmem adapter in this study. The figure shows the regions involved in the verification read and output readback, rather than the full memory layout.
Enlarge diagram
Two panels compare the regions read after vector addition. The specified Python/C++ path in uPIMulator reads a total of 8192 bytes containing vector A and output vector C. The study protocol extracts the 4096-byte output vector for comparison with the independent reference. The second panel shows the 4096-byte output region read back to the host in the simulation by the Downmem adapter used in this study. The output vector is shown at the same visual scale in both panels.

Where Does the Study Stand?

The following table summarizes the study's stages, including completed work and the work currently in progress.

Table 4. Study stages and current status.
StageStatusScope of work
1. Literature review and research questionCompleteDefine the problem's scope and the conditions for interpreting a comparison between the simulators.
2. Feasibility study and case selectionCompleteSelect the tools and vector addition as the starting point for the experiment.
3. Experimental protocol documentationCompleteFix the settings, test cases, and decision criteria.
4. Reference and verification tool developmentCompletePrepare the input generator and the tools for extracting outputs and recording events.
5. Diagnostic checks and execution environment preparationIn progressComplete the checks needed to run the comparison with the pinned versions and settings.
6. Running the six comparison casesNextCollect the evidence needed to assess the outputs and interpret the logs.
7. Evaluating detection of controlled errorsPlannedTest the protocol's response to specified changes in transfer lengths or memory offsets.
8. Preparing the paper and verification packagePlannedDocument the methodology, results, and limitations, and prepare the work for peer review.

The evidence needed for the comparison is still being assembled, and the final experimental assessment of agreement between the simulators is not yet complete.

What Does the Study Aim to Contribute?

The study aims to provide a verification protocol that can be traced and reapplied. It specifies the experimental conditions, checks outputs against an independent reference, and explains the events included in the comparison. The intended benefit is to help researchers interpret reported figures on a documented basis, identify the conclusions supported by the evidence, and understand the limits of generalization.

Origins of the study: The study grew out of a critical review of an earlier collaborative university experiment involving gem5, which is why the page retains the archival name gem5-pim in its URL. Yahya Ali Alali now leads the current research independently, focusing on the UPMEM architecture and the uPIMulator and Downmem simulators.

Study background: Review of the earlier gem5 course study

References and documentation

  • [1] UPMEM architecture and the PrIM benchmark suite

    J. Gómez-Luna, I. El Hajj, I. Fernandez, C. Giannoula, G. F. Oliveira, and O. Mutlu, “Benchmarking a New Paradigm: Experimental Analysis and Characterization of a Real Processing-in-Memory System,” IEEE Access, vol. 10, pp. 52565–52608, 2022.

    Original source · Publication record · Official repository

  • [2] uPIMulator research paper

    B. Hyun, T. Kim, D. Lee, and M. Rhu, “Pathfinding Future PIM Architectures by Demystifying a Commercial PIM Technology,” IEEE International Symposium on High-Performance Computer Architecture (HPCA), 2024.

    Original source · Official repository

  • [3] Public Downmem source repository

    benbii/downmem, source repository, snapshot e96e167216d17d289c39da6bb5025561d1329c09. Accessed 12 November 2026.

    Original source

    This source documents the public tool; it does not document the adapter used in this study.

  • [4] Vector addition and output verification in uPIMulator

    VIA-Research/uPIMulator, Python/C++ vector-addition data preparation, kernel, and output checking, commit 870d916334e9ff0b190f555f951a9ec3c4257781.

    Original source · Output checking · Vector-addition kernel

Help improve this content

Suggest a correction or edit

Your contribution is private and used to review and improve this content. The Privacy Policy explains how data is processed and retained and how to request deletion. Read the Privacy Policy and Terms of Use.