CoMoNM : A Co st Mo deling Framework for Compute- N ear- M emory Systems
Hamid Farzaneh, Asif Ali Khan, Jeronimo Castrillon · 2025
Read CoMoNM : A Co st Mo deling Framework for Compute- N ear- M emory Systems by Hamid Farzaneh, Asif Ali Khan, Jeronimo Castrillon (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2508-11451.txt.
Introduction
Hamid Farzaneh, Asif Ali Khan, and Jeronimo Castrillon build a cost model for computing near memory in this 2025 paper. Such systems place small processors beside the data to dodge the bottleneck between memory and a distant central chip. Designing for them is slow, because judging a program layout takes long simulations.
Their framework, CoMoNM, takes a program sketch, machine details, and a mapping plan, then predicts run time in milliseconds. Plugged into existing compilers, it improved decisions about which tasks to offload near memory. Against a real UPMEM system and a Samsung memory chip simulator, its estimates missed by only a few percent. And it ran about ten million times faster than the simulators it replaces.
Catalog record
| CREATOR | Hamid Farzaneh, Asif Ali Khan, Jeronimo Castrillon |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 53 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2508-11451
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
CoMoNM : A Co st Mo deling Framework for Compute- N ear- M emory Systems Hamid Farzaneh, Asif Ali Khan, Jeronimo Castrillon Abstract Compute-Near-Memory (CNM) systems offer a promising approach to mitigate the von Neumann bottleneck by bringing computational units closer to data. However, optimizing for these architectures remains challenging due to their unique hardware and programming models. Existing CNM compilers often rely on manual programmer annotations for offloading and optimizations. Automating these decisions by exploring the optimization space, common in CPU/GPU systems, is difficult for CNMs as constructing and navigating the transformation space is tedious and time consuming. This is particularly the case during system-level design, where evaluation requires time-consuming simulations. To address this, we present CoMoNM , a generic cost modeling framework for CNM systems for execution time estimation in milliseconds. It takes a high-level, hardware-agnostic application representation, target system specifications, and a mapping specification as input and estimates the execution time for the given application on the target CNM system. We show how CoMoNM can be seamlessly integrated into state-of-the-art CNM compilers, providing improved offloading decisions. Evaluation on established benchmarks for CNM shows estimation errors within ± \pm 7.80% and ± \pm 2.99%, when compared to the real UPMEM CNM system and Samsung’s HBM-PIM simulator. Notably, CoMoNM delivers estimates seven orders of magnitude faster compared to the UPMEM and HBM-PIM simulators. I Introduction The emerging computing-near-memory (CNM) paradigm tackles the von-Neumann bottleneck by moving computation closer to the data 1 . These systems have gained significant attention in recent years due to the growing demand for data-intensive applications domains, such as machine learning and bioinformatics, which expose the limits of conventional computing systems 2 , 3 , 4 . Examples of CNM systems include UPMEM 5 , Samsung’s HBM-PIM 6 , Alibaba’s HB-PNM 7 , and SK hynix’s AiM 8 , which promise substantial improvements in energy efficiency, performance, and bandwidth. However, they also bring challenges, such as hardware design complexity, programming model design 9 , and memory management 10 . To address these challenges of CNM systems, several tools have been proposed in recent years. This includes simulators (e.g., PIMSimulator 11 , ZSIM-Ramulator 12 , uPIM 13 ) and programming frameworks 14 , 15 , 16 , 17 , 18 . While simulation tools are often technology-specific and slow, programming frameworks focus on abstracting away hardware details for easier programmability. They typically assume a fixed architecture, hindering detailed architectural exploration. Existing analytical models for CNM systems, and compilation frameworks that leverage them for offloading decisions 16 , 9 , often employ overly abstract hardware models, leading to inaccurate performance predictions (deviating by over an order of magnitude). Domain-specific frameworks like SADIMM 19 deliver accurate estimates but only for sparse attention kernels. In contrast, detailed cost models have been instrumental in CPU/GPU systems for decades, enabling design space exploration, optimization guidance, and intelligent offloading decisions 20 , 21 . For example, 21 proposes a neural network-based model for steering OpenMP offloading. Although CNM programming models share similarities with the offloading model for GPUs, their underlying memory-centric architectures, optimized for efficient memory access, differ significantly. Unlike GPUs with deep memory hierarchies, CNM systems typically have simpler computational units (e.g., RISC cores or domain-specific units) with direct access to larger memory pools. Memory management is often handled by custom logic 6 or DMA engines 5 , but requires expert programming due to constraints such as data alignment in specific formats (e.g., transposed and interleaved in UPMEM). This, together with the access granularity, result in non-uniform latencies which makes the execution time estimation more challenging. Despite this added complexity, optimization and offloading responsibilities currently fall on the programmer, with the few existing optimizing compilers for CNM systems relying on simple, empirically-derived heuristics 14 , 22 , 23 , 24 . These heuristics build atop established optimizations, that have proven efficient for multi-core CPUs and GPUs, like tiling for locality. We argue and show in this paper, that a proper modeling framework that captures the particularities of CNM architectures can reveal new optimization possibilities and thus better help guide the compilation process. Fig. 1 : CoMoNM with SoA CNM compilation frameworks Instead of importing assumptions from mainstream architectures, accurate and fast cost models can facilitate a thorough understanding of the trade-offs in CNM architectures, empowering compiler, system, and performance engineers to make informed decisions. To this end, we introduce CoMoNM , a generic cost modeling framework for CNM systems capable of estimating execution time in a few milliseconds. Fig. 1 provides a high-level overview of the abstractions and optimizations in state-of-the-art CNM compilation flows. These flows typically accept a high-level representation of the input application and progressively lower it to the target CNM system. Presently, user annotations, often based on educated intuitions, guide offloading code regions to CNM targets and applying various optimizations at different levels of abstraction. These optimizations are done without sounds models of CNM systems. CoMoNM offers different ways to interface to these frameworks (Fig. 1 ) to provide sound estimations of the effect of different transformations. As we show, this allows for better exploration of the design space. CoMoNM takes input applications (at different abstraction levels for compatibility with existing frameworks), the target system’s specifications, and a mapping of the application onto the system, and generates an estimated execution time for the given application and system configuration. CoMoNM ’s modular design and flexible front-end choices enable support for multiple CNM systems and should facilitate easy adaption to future architectures, as well as seamless integration into existing CNM compilation frameworks. We evaluate CoMoNM using the open-source PriM benchmark suite 25 and a set of machine learning applications. We show how the framework can be adapted to different CNM systems by providing a model and validating its accuracy against the UPMEM CNM system 5 and Samsung’s HBM-PIM simulator. Applications can be directly represented using CNM-specific programming models, such as the UPMEM C interface 26 , or through the several high-level domain specific languages (DSLs) that map to the linalg and affine dialects in MLIR 27 . These dialects are translated by CoMoNM ’s front-end ( cnm-gen ) into a virtual assembly we propose for CNM systems ( llvcnm ). We demonstrate that integrating CoMoNM into the state-of-the-art CINM compiler 14 can further enhance its performance and showcase its effectiveness in conducting design space exploration. Concretely, we make the following novel contributions. 1. We introduce CoMoNM , a generic cost model for CNM systems that rapidly and accurately estimates performance for a given application on a given CNM target system (Sec. IV ). 2. We develop cnm-gen , a front-end that takes a high-level hardware-agnostic representation of the input application and generates a virtual CNM assembly that is compatible with CoMoNM (Sec. IV-D ). 3. We propose a flexible mapping specification that captures the hierarchical nature of CNM systems, defining how computations are distributed across various levels (see Sec. IV-C ). 4. We evaluate CoMoNM on applications from diverse domains and validate its performance and accuracy against the the real UPMEM CNM system and the Samsung simulator (Sec. VI ). We further demonstrate CoMoNM ’s capability to rapidly explore huge design spaces, identifying non-intuitive transformations that outperform manual choices in