Global memory is the primary, high-capacity DRAM physically located on a Graphics Processing Unit (GPU). It serves as the main workspace for CUDA kernels, storing model weights, activations, and input/output data. Accessible by all threads across all thread blocks, it offers high bandwidth but has significantly higher latency than on-chip memories like shared memory or L1/L2 cache. Efficient management of global memory is critical for inference latency and throughput, as it is often the performance bottleneck for data-intensive workloads.
Glossary
Global Memory (Device Memory)

What is Global Memory (Device Memory)?
Global memory, also referred to as device memory, is the large, high-bandwidth, but higher-latency DRAM physically located on a GPU, accessible by all threads across all blocks and serving as the primary workspace for GPU kernels.
Optimizing access to this memory involves techniques like coalesced memory access to maximize bandwidth and using memory pools to reduce allocation overhead. In modern systems, it is part of a memory hierarchy that may include High Bandwidth Memory (HBM) and is managed alongside host memory via technologies like Unified Virtual Memory (UVM). For large models, strategies such as model quantization and KV cache management directly target reducing the footprint in global memory to avoid costly swapping to slower tiers.
Key Characteristics of Global Memory
Global memory, also called device memory, is the primary, high-bandwidth DRAM on a GPU. It is accessible by all threads but has higher latency than on-chip caches, making its management critical for performance.
Primary Workspace for Kernels
Global memory serves as the main data workspace for GPU kernels. It holds the input data, intermediate results, and final outputs for parallel computations. Unlike shared memory, which is private to a thread block, global memory is accessible by all threads across all blocks launched on a GPU. All data transferred from the host (CPU) via cudaMemcpy resides here, and kernels read from and write to this memory to perform their computations.
High Bandwidth, High Latency
Global memory provides extremely high bandwidth (hundreds of GB/s to over 1 TB/s on modern GPUs) but also has high latency (hundreds of clock cycles). This latency is mitigated through massive parallelism: while one warp of threads is stalled waiting for data, the GPU scheduler can switch to other warps that are ready to execute, effectively hiding the latency. Achieving peak bandwidth requires coalesced memory access patterns, where consecutive threads in a warp access consecutive memory addresses.
Managed by a Virtual Memory System
Modern GPUs manage global memory through a virtual memory system, similar to CPUs. This enables key features:
- Unified Virtual Memory (UVM): Creates a single virtual address space shared by CPU and GPU.
- Demand Paging: Data is migrated to GPU memory only upon access (page fault).
- Memory Overcommit: Allows allocation of more memory than physically exists on the GPU, with pages swapped to host memory or storage. This abstraction simplifies programming but introduces overhead for page fault handling and migration.
Subject to Access Pattern Constraints
Performance is heavily dependent on memory access patterns. Optimal patterns maximize throughput:
- Coalesced Access: Consecutive threads access consecutive 32-byte aligned segments. This merges requests into a minimal number of transactions.
- Strided or Misaligned Access: Threads access non-consecutive addresses, causing multiple, smaller transactions and drastically reducing effective bandwidth.
- Partition Camping: Excessive accesses to a single memory channel can create a bottleneck, even if accesses are coalesced. Profiling tools like Nsight Compute are essential for identifying suboptimal patterns.
Hierarchical Placement and Caching
Global memory sits at the bottom of the GPU's memory hierarchy, above system memory and storage but below on-chip memories. It is cached by several structures:
- L2 Cache: A large, unified cache shared by all Streaming Multiprocessors (SMs) that helps capture spatial and temporal locality.
- Read-Only Cache: A dedicated cache for data marked as constant (
__constant__) or accessed via specific intrinsics. - Texture Cache: Optimized for 2D spatial locality. Data not found in these caches must be fetched from global memory at full latency. Effective use of shared memory as a programmer-managed cache is the primary strategy to reduce global memory traffic.
Allocation and Fragmentation Challenges
Dynamic allocation in global memory (e.g., cudaMalloc) is expensive and can lead to memory fragmentation. Over time, free memory can become divided into small, non-contiguous blocks, preventing the allocation of large buffers even if total free memory is sufficient. Best practices to mitigate this include:
- Using memory pools (arenas) for frequent allocations/deallocations.
- Pre-allocating large buffers and managing sub-allocations manually.
- Leveraging stream-ordered memory allocators (like
cudaMallocAsync) for asynchronous, context-aware allocation that reduces fragmentation. Fragmentation can lead to out-of-memory errors and reduced performance in long-running inference services.
Role in AI and Machine Learning Workloads
Global memory, also called device memory, is the primary, high-capacity workspace on a GPU accelerator, directly impacting the scale and speed of model inference and training.
Global memory (device memory) is the large, high-bandwidth DRAM physically located on a GPU, accessible by all threads and serving as the primary workspace for model weights, activations, and intermediate tensors. Its capacity is the critical constraint for determining which models can be loaded and at what batch size, making its management fundamental to inference latency and throughput. Unlike CPU system memory, it is optimized for massively parallel access but has higher latency than on-chip caches.
Efficient use of global memory is paramount for latency reduction. Techniques like memory pooling to avoid allocation overhead, coalesced memory access patterns to maximize bandwidth, and unified memory architectures to simplify data movement are essential. For large models, strategies such as model quantization and activation offloading are employed to work within fixed global memory limits, directly tying memory optimization to infrastructure cost control and scalable deployment.
GPU Memory Hierarchy Comparison
A comparison of the key memory types within a GPU's hierarchy, highlighting their role, scope, latency, and bandwidth relative to the primary workspace of Global Memory (Device Memory).
| Memory Type | Role & Scope | Relative Latency | Relative Bandwidth | Software Management |
|---|---|---|---|---|
Registers | Private storage for individual thread variables. | ~1 cycle | Extremely High | Automatic (Compiler) |
Shared Memory / L1 Cache | Low-latency cache shared by threads within a block for communication/data reuse. | ~10-20 cycles | Very High | Explicit (Programmer) |
L2 Cache | Unified cache shared across all Streaming Multiprocessors (SMs) on the GPU. | ~100-200 cycles | High | Automatic (Hardware) |
Global Memory (Device Memory) | Primary high-capacity DRAM workspace for all GPU threads; the main subject of optimization. | ~400-800 cycles | High (Peak) | Explicit (Programmer/API) |
Unified Virtual Memory (Host+Device) | Single virtual address space spanning CPU and GPU memory, enabling seamless data access. | Variable (Page Fault Penalty) | Variable (Depends on Location) | Automatic (Driver/Runtime) |
Page-Locked (Pinned) Host Memory | Non-pageable host memory enabling high-bandwidth DMA transfers to/from GPU. |
| High (for DMA) | Explicit (Programmer/API) |
Local Memory | Thread-private spill-over memory from registers, physically residing in Global Memory. | Global Memory Latency | Global Memory Bandwidth | Automatic (Compiler) |
Constant Memory | Read-only, cached memory for data accessed uniformly by all threads (e.g., kernel parameters). | Cache Latency if hit, Global if miss | High if cached | Explicit (Programmer/API) |
Texture Memory | Specialized read-only cache optimized for 2D spatial locality (e.g., image processing). | Cache Latency if hit, Global if miss | High if cached | Explicit (Programmer/API) |
Frequently Asked Questions
Global memory, also called device memory, is the primary high-bandwidth DRAM on a GPU. These questions address its role, management, and optimization for high-performance computing and machine learning workloads.
Global memory, also referred to as device memory, is the large, high-bandwidth, but higher-latency DRAM physically located on a GPU, accessible by all threads across all blocks and serving as the primary workspace for GPU kernels. It is the main pool of memory where data is transferred from the host (CPU) for processing. Unlike the small, fast shared memory or L1/L2 caches, global memory has significantly higher capacity (e.g., 16GB to 80GB+ on modern accelerators) but also higher access latency. Its performance is critically dependent on achieving coalesced memory access patterns to maximize effective bandwidth.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Global memory is the primary workspace for GPU kernels, but its high latency necessitates a suite of complementary memory technologies and management techniques for optimal performance.
Unified Virtual Memory (UVM)
A memory management architecture that creates a single, contiguous virtual address space shared between a CPU and GPU. This allows both processors to access the same memory pointers using a common page table, simplifying data sharing and enabling on-demand page migration.
- Key Benefit: Eliminates the need for explicit
cudaMemcpycalls for many data transfers. - Mechanism: Managed by the system's Memory Management Unit (MMU), which handles GPU page faults by migrating pages between host and device memory.
High Bandwidth Memory (HBM)
A 3D-stacked memory technology where DRAM dies are vertically integrated with a GPU processor using Through-Silicon Vias (TSVs). It is the physical hardware most commonly used for global memory in modern high-performance accelerators.
- Architecture: Stacks memory directly on the processor interposer, providing extremely wide memory buses (1024-bit to 4096-bit).
- Advantage: Offers significantly higher bandwidth (over 1 TB/s) and better energy efficiency compared to traditional GDDR memory.
- Use Case: Essential for feeding data-hungry workloads in AI training and large-model inference.
Shared Memory
A small, software-managed, on-chip cache memory on a GPU that is shared between all threads within a thread block. It acts as a programmer-controlled scratchpad to reduce accesses to the higher-latency global memory.
- Performance: Offers latency comparable to L1 cache and bandwidth an order of magnitude higher than global memory.
- Key Optimization: Avoiding bank conflicts, where multiple threads access the same memory bank, which serializes access.
- Typical Use: Staging data for cooperative algorithms like matrix multiplication or parallel reductions.
Page-Locked Memory (Pinned Memory)
Host (CPU) memory that is prevented from being paged out to disk by the operating system. This enables high-bandwidth Direct Memory Access (DMA) transfers between the host and global memory.
- Function: Allows the GPU's DMA engine to access host memory directly without CPU intervention.
- Impact: Can double the bandwidth of host-to-device memory copies compared to using standard, pageable host memory.
- Trade-off: Overuse can reduce available system memory for other processes and harm overall system performance.
Memory Hierarchy
The organization of memory subsystems in a GPU into multiple levels with differing capacities, latencies, and bandwidths. Efficient programming requires placing data in the optimal level of this hierarchy.
Levels (from fastest/smallest to slowest/largest):
- Registers: Private to each thread, fastest access.
- Shared Memory / L1 Cache: Shared per thread block.
- L2 Cache: Shared across all Streaming Multiprocessors (SMs) on the GPU.
- Global Memory (Device Memory): Large, high-bandwidth, high-latency DRAM.
- System Memory & Storage: Accessed via Unified Virtual Memory or GPU Direct Storage.
Coalesced Memory Access
An optimal pattern for reading from or writing to global memory where consecutive threads in a warp (a group of 32 threads) access consecutive memory addresses. This allows the memory controller to combine the accesses into a single, wide transaction.
- Mechanism: If thread T accesses address A, thread T+1 should access A+1 (for a 32-bit word).
- Benefit: Maximizes effective memory bandwidth, often achieving near-peak theoretical performance.
- Non-Coalesced Access: Scattered, unaligned accesses by a warp can result in 32 separate transactions, crippling performance.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us