arXiv:2609.05635cs.DCSep 2026

Manuscript Offprint

arXiv:2609.05635

DejaVu: Unifying Memory Allocations to Eliminate Redundant Copies on Unified-Memory SoCs

Yuheng Zhu, Yanbo Zhao, Jiajia Li, Man-Ki Yoon

Yuheng Zhu*

yzhu63@ncsu.edu

North Carolina State University

USA

Jiajia Li

jiajia.li@ncsu.edu

North Carolina State University

USA

Yanbo Zhao*

yzhao62@ncsu.edu

North Carolina State University

USA

Man-Ki Yoon

man-ki.yoon@ncsu.edu

North Carolina State University

USA

Abstract

GPU applications on unified-memory (UMA) edge platforms often inherit a discrete-GPU memory abstraction in which they allocate one buffer for the CPU, another for the GPU, and copy data between them before and after GPU execution. On UMA hardware these buffers reside in the same physical DRAM, so the copies consume bandwidth, time, and energy without moving data across a physical boundary. Despite the growing adoption of UMA platforms, this pattern remains common because production software stacks, libraries, and samples were written for portability across discrete GPUs. However, removing these copies is not as simple as merging the two buffers, because the original program may rely on the two buffers being distinct, or on the copy itself ordering CPU and GPU accesses.

DEJAVU removes these copies only when the program does not depend on the effects above. It does so along two complementary paths, depending on whether source is available. DEJAVU-SR is a compile-time LLVM transformation that proves safety and rewrites accepted pairs in place. DEJAVU-DR is a profile-guided binary optimizer for closed-source deployments that profiles and validates stable allocation/copy patterns and, at runtime, intercepts the matching calls to coalesce profile-matched pairs while preserving the ordering effects of removed copies.

Across seven benchmarks on three NVIDIA Jetson platforms, DEJAVU's benefit grows with the fraction of baseline time spent on copies. Copy-dominated workloads speed up by up to 6.9×, closed-source end-to-end applications speed up by 1.10–1.14×. Both source and binary paths achieve ≥99% of the performance achievable by manual optimization.

1 Introduction

Heterogeneous systems-on-chip (SoCs) that integrate a CPU and a GPU on the same die with a shared physical DRAM, known as unified-memory architectures (UMA), are increasingly prevalent in edge inference, robotics, autonomous

systems, and mobile computing [3, 24]. Sharing one physical DRAM between processors removes the off-chip data path that limits discrete CPU–GPU systems, while reducing power, cost, and board area.

Yet most accelerator code on UMA platforms continues to manage memory as if the GPU were discrete. Applications ported from discrete-GPU (dGPU) platforms or built on top of legacy libraries and frameworks still preserve the discrete-GPU programming model: allocate a host buffer, allocate a device buffer, copy host-to-device (H2D) before GPU execution, and copy device-to-host (D2H) afterward. Because both buffers reside in the same physical DRAM, these copies are redundant. It consumes unnecessary DMA bandwidth, CPU and GPU cycles, and energy, as it only transfers data between two virtual addresses backed by the same memory, without crossing any off-chip device boundary. The root cause is not a hardware limitation but inertia. Widely-used libraries, manufacturer-provided samples, and developer workflows were designed for discrete GPUs and remain largely unchanged even as UMA platforms became common. Portability concerns further reinforce it, since code that must also run on discrete-GPU systems follows the same legacy pattern by default.

Among accelerator programming models, CUDA (Compute Unified Device Architecture) is the most widely deployed on UMA edge platforms. NVIDIA Jetson, the dominant commercial UMA SoC family, exposes its compute capability through CUDA, and the production inference stacks built on top of it (e.g., TensorRT, cuDNN, cuBLAS) follow the same host-device separate-buffer convention by default. For example, NVIDIA's TensorRT samples [20] ship a Buffer-Manager class that allocates host and device buffers separately and copies data between them explicitly, and downstream developers often reuse the same structure. We conduct a static survey of 34 open-source Jetson GPU repositories (§2.4) and find that 19 of them (56%) still contain the legacy pattern, rising to 10 of 11 (91%) among inference-specific projects. Together, these numbers show that the GPU software ecosystem has not fully adapted to UMA edge platforms. We therefore take CUDA on Jetson as our concrete

*Contributed equally.

Figure

(a)

(b)

(c)

Figure 1. Overview of DEJAVU. (a) & (b) DEJAVU detects and unifies separate host and device allocations into a single managed allocation and eliminates redundant copies on UMA platforms. (c) Speedup (bar) achieved by DEJAVU on NVIDIA Jetson AGX Orin, overlaid with fcopyf_{copy} (line), the fraction of total runtime spent on memory copies before transformation.

study platform. However, the analysis and transformation we develop are not inherently platform-specific.

Figure 1(a) contrasts the legacy dGPU-style pattern with what UMA-aware code should do instead. The cost of leaving this redundancy in place is not negligible. On a representative TensorRT [21] inference pipeline running FCN-ResNet50 [8, 12] on Jetson AGX Orin [17], we measure that over 30% of per-iteration wall-clock time is spent on H2D and D2H copies (see Table 1) that are avoidable on a UMA platform.

Eliminating this redundancy requires solving two sub-problems: (1) pattern detection, identifying a single logical buffer that has been split into a separate host and device allocation linked by copies; and (2) transformation, replacing the allocation pair with a single buffer shared by both host and device, and removing or bypassing the associated copies while preserving the synchronization they enforce. Despite how mechanical this may appear, neither step is a naive find-and-replace. The transformation is safe only when no other part of the program relies on the host and device pointers being distinct, or on the copy enforcing an order between host and GPU accesses. Proving that automatically is hard, and harder still in production software, where the copy path may lie inside a precompiled library with no source to analyze.

We present DEJAVU, a system that automatically detects and safely eliminates these redundant copies on UMA platforms. It does so both when source is available and when it is not, trading a universal soundness guarantee for deployability in the latter case. DEJAVU-SR (Static Replacement) is a compile-time LLVM pass for source-available code. It identifies host/device pairs whose unification provably cannot change the program's observable behavior, then transforms each pair into a single unified allocation and replaces copies with explicit synchronization where needed ( §3.2§3.2). DEJAVU-DR (Dynamic Replacement) is a binary-level optimizer for deployments where no source is available to rewrite or the copy path is buried inside a precompiled runtime. Because it has no source-level view, DR cannot soundly verify the static safety conditions for all inputs. Instead, it conservatively

applies guarded, profile-matched allocation coalescing for stable binary deployments and provides profile-conditional correctness: the optimization holds as long as runtime execution matches the profile ( §3.3§3.3).

We evaluate DEJAVU on seven benchmarks and a negative control: three CUDA-library micro-benchmarks (cuBLAS [14], cuFFT [16], cuDNN [15]), two canonical TensorRT inference pipelines (FCN-ResNet50 [8, 12], FCN-ResNet101), and two end-to-end applications (YOLOv5 [27], DeepSORT [22]). We run the evaluation across three NVIDIA Jetson platforms (Orin Nano, AGX Orin, and AGX Thor), covering two GPU architectures (Ampere and Blackwell) and varying memory bandwidths and compute capabilities. Figure 1(c) summarizes the representative result on AGX Orin. With DEJAVU, copy-dominated micro-benchmarks achieve up to 6.9× speedup, canonical inference pipelines 1.28–1.47×, and closed-source end-to-end applications 1.10–1.14× without source changes. On the five source-available benchmarks where both SR and DR apply, each reaches ≥99% of manually optimized performance. Beyond latency, DejaVu also yields energy savings. On Orin, per-iteration energy reduction ranges from 9% to 86% and scales with the copy fraction.

The evaluation also exposes two deployment boundaries. First, copies inside a closed-source runtime such as TensorRT that never cross the intercepted API are invisible to DR and limit the achievable speedup. Second, managed-memory performance varies by platform, so coalescing is not always profitable.

In summary, we make the following contributions:

  1. A deployment characterization of the discrete-GPU separate-buffer pattern in widely-used Jetson CUDA software, including its prevalence and its relevance to production inference stacks.

  2. DEJAVU-SR, a sound LLVM transformation that coalesces allocation pairs and eliminates the associated copies only after proving the transformation is safe.

  3. DEJAVU-DR, a profile-guided binary optimizer that brings the same allocation coalescing to unmodified, closed-source binaries by matching stable, API-visible allocation/copy patterns.

  4. An evaluation across three Jetson platforms and seven benchmarks showing that speedup and energy savings scale with copy fraction, that binary-only applications can benefit without recompilation, and that platform-specific managed-memory behavior defines a deployment boundary.

References (10)