Skip to main content

20 docs tagged with "memory"

View all tags

CPU Memory Architecture for ML

How CPU memory hierarchy - L1/L2/L3 caches, DRAM, and NUMA topology - shapes ML data pipelines, DataLoader performance, and large model loading strategies on multi-socket servers.

GPU Memory Hierarchy Deep Dive

Complete GPU memory hierarchy - registers, L1/shared memory, L2 cache, and HBM - capacity, bandwidth, latency at each level, and how data flows through the hierarchy during kernel execution.

HBM and GDDR Memory Technologies

High Bandwidth Memory vs GDDR6X - how 3D stacking with Through-Silicon Vias enables HBM3 to deliver 3.35 TB/s on H100, why GDDR6X tops at 1 TB/s, the economics of each, and how memory bandwidth constrains LLM inference throughput.

Memory Bandwidth Roofline Analysis

Learn to apply the Roofline model to diagnose whether GPU kernels are memory-bound or compute-bound, calculate arithmetic intensity, and use roofline plots to guide real optimization decisions.

Memory Capacity Planning for LLMs

How to compute exact GPU memory requirements for LLM training and inference - model weights, optimizer states, activations, KV cache - and how to plan GPU cluster configurations for target models.

Memory Management Internals

CPython's memory allocator layers, the pymalloc arena system, reference counting, cyclic GC generations, and how memory is actually freed.

Memory References and Aliasing - Python's Object Reference Model

Master Python's memory management at the engineering level - CPython reference counting (ob_refcnt), cyclic garbage collection, aliasing, weak references, del semantics, sys.getrefcount, memory leaks from closures and global caches, and real-world debugging strategies.

Module 06: Agent Memory

How agents store, retrieve, and manage knowledge across interactions - working memory, episodic memory, semantic memory, procedural memory, and cross-session persistence.

Mutable vs Immutable - Designing Reliable Data Structures

Master Python mutability at the engineering level - the object model (id, type, value), pass-by-object-reference, the mutable default argument anti-pattern, frozen dataclasses, += behavior differences, string concatenation performance, and designing reliable concurrent systems.

PCIe and NVLink Interconnects

Understand PCIe bandwidth limitations for CPU-GPU data transfer, NVLink for high-speed GPU-to-GPU communication, NVSwitch topology in DGX systems, and how to design systems that avoid interconnect bottlenecks in multi-GPU AI training.

Python Memory Optimisation

Object memory overhead, __slots__, generators, memory-mapped files, and GC tuning - reducing Python's memory footprint in production.

Python Objects Under the Hood

PyObject layout, type objects, reference counting, small integer cache, string interning, and the cost of Python's dynamic type system.

Shallow vs Deep Copy - Understanding Python's Memory Model

Master shallow and deep copy in Python at the engineering level - assignment aliasing, copy.copy() vs copy.deepcopy(), ASCII memory diagrams, the memo dict, circular references, custom __copy__/__deepcopy__ protocols, and production-ready patterns for defensive copying.

Storage IO for Training Pipelines

How storage IO bottlenecks GPU utilization in ML training, NVMe and distributed filesystem characteristics, data loading patterns with WebDataset and DALI, prefetching strategies, and designing checkpointing that does not stall your cluster.

Tuples and Immutability - Engineering with Stable Data

Master Python tuple internals at the engineering level - CPython PyTupleObject layout, immutability vs constancy, hashability mechanics, named tuples, structural unpacking, and when to choose tuples over lists in production code.

Unified Memory and Memory Pooling

How CUDA Unified Memory works under the hood, when it helps versus hurts performance, and how PyTorch's caching allocator and memory pools eliminate allocation overhead in production ML systems.