Elamur Research

Analyzing GPU Energy Consumption in Data Movement and Storage

Paper · 2024 · Paul Delestrac, Jonathan Miquel, Debjyoti Bhattacharjee et al.

Summary

A GPU can spend a substantial part of its energy moving data even when the program running on it is limited by arithmetic throughput. How much energy goes to that movement, and which memories account for it? The authors study these questions on an NVIDIA A100. Its built-in sensor reports power for the GPU as a whole. Its performance counters can describe traffic through the memory hierarchy. The paper brings these observations together to estimate how much energy is attributable to shared memory, the L1 and L2 caches, and the GPU’s main memory, or DRAM.

The authors first run small programs that repeatedly access a chosen memory level. They check where the requests actually go, vary how many transfers the programs make, and fit a line to the resulting energy measurements. The slope estimates the cost of another transfer under those conditions. They also vary how many threads make requests together. A sparsely threaded benchmark gives an L1 load estimate of around 1600 pJ per access with one thread per block, whereas the estimate with 1024 threads per block is 107 pJ. For subsequent workload analysis, they use the lowest estimates observed in calibration. The intent is to price memory traffic conservatively, using conditions in which threads make effective use of fetched data and the hardware can serve requests in parallel.

The workload experiments show why that distinction matters. In the largest tested matrix multiplication, the estimated energy associated with memory traffic is around 30% of total GPU energy, even though the authors classify the calculation as compute-bound. In a ResNet-50 training iteration, the estimate reaches 84% of dynamic GPU energy, the energy above the idle baseline. The fraction depends strongly on the software settings. Mixed precision with eager execution gives 29%, while mixed precision with just-in-time compilation gives 60%. DRAM accounts for above 70% of the energy attributed to the memory hierarchy in the training experiment. Shared memory makes the largest contribution among the memory levels in the matrix multiplication experiment.

The estimates give a breakdown of energy that a single power reading would leave undifferentiated. They account for memory transactions at favorable calibrated costs, while the measured dynamic energy also includes arithmetic, other activity, and any extra cost of moving data less efficiently. The paper’s strongest result is that memory traffic can account for a large fraction of workload energy even under this conservative accounting.

Deep dive: Analyzing GPU Energy Consumption in Data Movement and Storage

Delestrac and colleagues use GPU power readings and memory traffic counters to estimate the energy cost of moving data on an NVIDIA A100. · about 34 minutes to read

The problem and its context

From a power reading to an explanation

An engineer who measures GPU power during a program can see when the device draws more or less power. The reading applies to the whole device, so it leaves open a question that matters for design. Would the larger energy saving come from changing how the arithmetic runs, changing the way data reaches the arithmetic, or changing the memory hardware that serves those requests? An answer requires some way to attribute the reading to activity within the GPU. The paper investigates the part of that attribution that concerns moving and storing data.

In GPU & parallel computing, a kernel is a program whose instructions are executed by many threads. The memory activity behind those instructions depends on where a thread’s data resides and on what the other threads request. A request can be served by a cache close to the processing core, by a cache shared across cores, or by main memory. Threads can also use shared memory, a space they address explicitly. These destinations have different roles. Knowing that a program performs a large volume of loads is therefore only a starting point for explaining the energy it uses.

The authors put this problem in the context of improvements in GPU throughput and latency, including the addition of tensor cores in 2017. GPUs became attractive for demanding workloads such as training neural networks, and energy demand remained substantial. The paper cites a thermal design power of 400W for the A100. That specification explains part of the motivation for studying energy use. The experiments themselves use readings from running programs, where power varies with device activity and energy depends on the time for which that power is drawn.

A practical obstacle is that the GPU’s internal design is complex and proprietary. The manufacturer’s tools expose measurements such as transaction counts and device power. A transaction counter says that a particular kind of activity took place, while the power reading reflects the combined effects of that activity and everything else running on the device. The paper asks whether a useful attribution can be made from these observations. Its approach is to create workloads whose traffic has a known destination, check that behavior with the counters, and examine how energy changes as the traffic increases.

The target is a low estimate of the energy attributable to memory. This choice matters when comparing ways to organize computation. An experiment that uses memory inefficiently can make each counted transfer look expensive, and applying that cost to a highly parallel application can inflate the apparent energy consumed by its data traffic. The authors therefore put care into both halves of the experiment. They isolate traffic to a chosen memory and also try to give that traffic the benefit of concurrent requests and well-used transfers.

What earlier methods could observe

Earlier studies described in the paper used simulation, measurements from small benchmarks, performance counters, and program analysis to study GPU power. Their aims differed. Some predicted total device power, some estimated the contributions of components, and some examined the cost of particular instructions. Simulation can represent components individually, but its estimates depend on how faithfully it represents the device. Simulating heavy workloads can also take a long time. Delestrac and colleagues instead use observations from the running GPU, with a compact set of equations to connect those observations.

Some earlier approaches used external instruments to measure the board’s power. That arrangement is possible when the researchers can reach and instrument the hardware. A cloud server can give the user enough access to launch workloads and read telemetry while leaving the device itself physically inaccessible. The authors discuss earlier comparisons of internal readings with external instruments as support for working with the built-in sensor. They also draw on previous work on processing and aligning readings from that sensor. Their methodology allows external measurements when available, because the calculation still needs the power trace to be placed in relation to the kernel’s execution.

Another line of work inspected PTX, an assembly-level representation of GPU instructions. The paper places Braun and colleagues’ work on GPU-kernel execution time and power prediction among approaches that use PTX analysis. Access to this representation becomes a constraint with vendor-supplied, precompiled software. The distinction matters in practice because a training program can call cuDNN through TensorFlow or PyTorch, leaving library internals outside what the person profiling the program can inspect. The authors use assembly when constructing their own calibration benchmarks, where they control the instructions. For an application, they rely on measured traffic and energy. Braun and colleagues on GPU kernel time and power · cuDNN · TensorFlow · PyTorch

The paper also describes earlier work that predicted power from counters using trained neural networks. The authors acknowledge that such predictors can estimate overall power accurately. Their concern is that the influence of a physical component can be difficult to recover from learned weights. Here, each fitted access cost has an explicit place in the calculation. An estimate for DRAM traffic can be traced to the DRAM calibration, the workload’s count for that level, and the rule used to combine them. The cost of this transparency is a narrower goal. The method is designed to explain part of the power bill after running and profiling an application.

Other studies focused on arithmetic instructions or on memory categories defined by the programming interface. The authors argue that these categories can leave out distinctions that matter for energy. A programmer can issue a load from a global address even when that request is served by a hardware-managed cache. Studies that only use the address space named in the program have limited visibility into those cache effects. Instruction-level studies still give the authors comparisons for their own checks. In particular, they use an earlier measurement of the cost of division on NVIDIA hardware when interpreting their experiment that adds division to a load benchmark. Arafa and colleagues on instruction-level energy measurement

Some of the methods closest to this paper already combined small benchmarks with measurements of GPU activity. The authors’ criticism is that results from older architectures or from a narrow range of benchmark shapes can be difficult to carry over to newer cache hierarchies. Operation type, the number of threads and blocks, and the addresses requested together can all affect the apparent cost of memory traffic. The contribution is to make those conditions explicit in the calibration, to verify the memory destination experimentally, and to apply the resulting costs to applications that are more complex than the benchmarks used to obtain them.

The method, step by step

What a memory access means in this experiment

Threads are arranged into blocks, which are scheduled on cores called streaming multiprocessors, or SMs. Within an SM, the threads of a block are grouped into warps of 32. Instructions from different warps can be issued in an interleaved order while several requests are outstanding at once. Two programs with comparable numbers of load instructions can therefore make different demands on memory. One may ask for adjacent data in a way that lets threads share a transfer, while the other may send those requests to different regions.

The paper distinguishes the L1 cache, private to each SM, from the L2 cache, which is shared by multiple SMs. It also accounts for DRAM, the GPU’s main memory, and shared memory, which the programmer fills and addresses explicitly. A cache hit means that the requested data is present at that level. A miss means the request has to be satisfied farther down the hierarchy. Hence, the layer of memory named by the programmer and the location that supplies the data are distinct pieces of information. The authors need the latter to calibrate a cost for each level.

The hardware fetches data in units larger than an individual value requested by a thread. The paper calls the size of such a unit the access granularity and uses 32 bytes as the sector size for the A100 load calibration. Threads can make better use of a sector by requesting different values within it. The paper calls the grouping of requests into such transfers coalescing. A second opportunity comes from serving different transfers concurrently. A benchmark can make full use of each sector and still issue too few requests to use the available memory ports effectively. The calibration makes room for both effects.

Calibrating memory access costs and applying them to workloads

The steps in order.

Calibrating memory access costs and applying them to workloadsStep 1: Identify cache capacities and traffic counters1. Identify cache capacities and traffic countersStep 2: Build pointer-chasing benchmarks for each memory2. Build pointer-chasing benchmarks for each memoryStep 3: Prime the target and verify its traffic3. Prime the target and verify its trafficStep 4: Measure active energy above the idle baseline4. Measure active energy above the idle baselineStep 5: Fit access costs across traffic volumes5. Fit access costs across traffic volumesStep 6: Select low costs across thread configurations6. Select low costs across thread configurationsStep 7: Profile workload energy and memory traffic7. Profile workload energy and memory trafficStep 8: Attribute energy to each measured memory level8. Attribute energy to each measured memory level

The energy quantities in the calculation

The accounting begins with total GPU energy over the interval in which the kernel runs. The authors partition it into a baseline contribution and an additional contribution associated with activity during execution.

Eₜₒₜₐₗ = Eₛₜₐₜᵢ꜀ + E_dᵧₙₐₘᵢ꜀

Here E denotes energy. The subscript total marks the entire device energy during execution. The subscript static denotes the energy assigned to sustaining the GPU at its idle baseline for that interval. The subscript dynamic denotes the additional energy above that baseline. The plus sign adds the contributions, and the equality specifies the partition. Static power can depend on the temperature, voltage, and clock frequency of the device. In this experiment it is estimated from an idle interval close to the kernel run.

The next equation expresses the authors’ conceptual division of the dynamic part.

E_dᵧₙₐₘᵢ꜀ = Eₘₑₘₒᵣᵧ + E꜀ₒₘₚᵤₜₑ

E_dynamic is the GPU energy above the idle baseline. E_memory is the energy spent on data movement and storage, and E_compute is the energy attributed to computing activity in the SMs. The plus sign combines the contributions, and the equality gives their conceptual relationship. In the application experiments, the authors estimate the memory term conservatively. This means the observed energy left over after deducting that estimate can contain memory energy as well as computation.

The paper further divides the memory contribution according to the level that serves the traffic.

Eₘₑₘₒᵣᵧ = ∑_{MEM} E_{MEM}

E_memory denotes the combined energy attributed to the memory hierarchy. MEM indexes the memory levels in the accounting. E_MEM is the term for the level indexed by MEM. The summation sign says to add those terms across levels, and the equality defines the aggregate. In the A100 implementation, the summation covers shared memory, L1, L2, and DRAM. The general scheme allows for loading and storing at those destinations.

At each level, the authors assume that the measured energy can be written as an access-dependent part and an offset.

E_{MEM} = #accesses × ε_{MEM} + ΔE_{MEM}

E_MEM is the energy associated with the chosen memory level, and #accesses is the number of qualifying accesses. ε_MEM is the fitted energy cost per access to that level. ΔE_MEM is the offset associated with activating resources used by the memory traffic. Multiplication scales the unit cost by the observed volume. Addition includes the offset, and the equality gives the linear relationship used for calibration. On a plot of energy against transaction count, ε_MEM is the slope and ΔE_MEM is the intercept.

For a hardware-managed cache, the count used in this accounting is the count of hits. The paper assigns a miss to the lower level that ultimately satisfies the request, whether a lower cache or DRAM. That lets the authors construct a per-level breakdown from observed destinations. There can still be energy spent looking up an address in a cache that misses. The hit-based rule is a choice about which events to attribute individually, consistent with seeking a low estimate rather than tracing every electrical event that a request caused.

Finding a working set for each level

The device identification phase establishes what can be counted and what array sizes will exercise the different memories. The authors use NVIDIA Nsight Compute, abbreviated ncu, to obtain counter metrics. These let them check the number of transfers and the proportion of hits and misses at relevant cache levels. A profiler can only observe a limited set of counters in a single profiling run. Asking for additional metrics can cause kernel replays, which add overhead. The authors select metrics that describe transactions at the levels being calibrated.

The other input is an array size suitable for targeting each level. The manufacturer’s stated capacity offers a starting point. The authors also measure miss rate as they vary the size of an array. This makes the effective capacity of a cache visible to the specific access pattern used in the test. The L1 miss rate starts climbing once the array passes 150kB and reaches 100% at 190kB. The L2 miss rate starts climbing at 15MB and reaches 100% at 22MB. These figures come from an array sweep spanning 1kB to 1GB.

The manufacturer describes a configurable 192kB space shared between L1 and shared memory. It describes a 40MB L2 cache split into two 20MB partitions. The authors regard the miss-rate observations as consistent with this organization. For experimental purposes, the observations tell them to leave room between the chosen working set and the nominal capacity. A workload can begin missing before the array reaches the advertised aggregate size, so the capacity figure on its own is insufficient to guarantee that the measurement loop stays at the intended level.

The load experiments use arrays of 150 kB for L1, 250 kB for L2, and 50 MB for DRAM. For shared memory the authors use 48 kB, which they identify as the A100’s maximum static allocation per block. The L2 choice illustrates the objective. The array can exceed the near-cache working set while remaining comfortably within the lower cache. The counters then test whether the memory behavior actually follows the intended placement. DRAM is exercised with a larger working set, and shared memory can be populated directly because its use is controlled by the program.

Constructing and checking the benchmark runs

The benchmark follows a chain of pointers through an array of 64-bit unsigned integers. An element leads to another element, and that next address becomes the input to the following load. The array layout supplies a regular stride, meaning a chosen distance between successive locations. The test can execute a long sequence of memory operations with a relatively small amount of surrounding work. The authors have separate CUDA benchmark implementations for loads and stores, using inline PTX assembly to specify operations. The reported A100 calibration uses the load implementation.

For a cache experiment, the benchmark first walks the chain to bring the data into the target cache. This is the warm-up interval. When the data first arrives from global memory, the authors expect requests to miss at the targeted cache. They then run a measurement loop over the prepared chain, where requests are expected to hit. For shared memory, the program explicitly fills the space rather than relying on hardware cache warm-up. Main memory already holds the data for the DRAM experiment, so it needs no cache-filling loop for that destination.

The measurement loop repeats the memory instruction several times inside its body. This is loop unrolling. It increases the proportion of load instructions relative to loop control, such as testing whether the chain has reached its end and branching back. The benchmark also repeats the measurement loop to sustain activity. That extends the interval in which the GPU exhibits the intended behavior, reducing the influence of power changes as execution starts and stops.

For the warm-up procedure, the authors run a version with the preparation alone and a version with preparation followed by the measurement loop. They deduct the energy and counter values from the warm-up-only run from the corresponding quantities for the combined run. The resulting observations are assigned to the measurement loop. The comparison depends on keeping the preparation comparable between the runs. It is also part of why the paper checks the resulting counter values, since the instruction sequence alone cannot establish that the requests reached the desired memory.

Changing the level of parallelism

The stride and the thread arrangement work together. If requests move too little between steps in a test aimed at a farther level, threads may reuse data fetched by a preceding request and generate unintended cache hits. The authors use the access granularity of the intended memory as the minimum stride. They note that L2 access granularity on the A100 can be configured to 32, 64, or 128 bytes. The illustrative load pattern uses a stride of 32 bytes, a sector that contains 4 values of the type used by the benchmark.

With 1 thread per block in that example, each step uses some of the data returned from its sector and leaves the rest unused. When 4 threads request the corresponding values together, they can make use of the whole sector. Increasing the number of participating threads beyond that point can help through a different mechanism. More requests can be served at the same time through multiple ports, reducing the time needed for the issued traffic and spreading the energy of enabling the memory path across more activity. Increasing the number of blocks also creates opportunities for concurrent accesses.

The paper gives an idealized expression for the fully coalesced case. In the displayed expression, it represents the number of accesses by scaling a rounded-up coverage term by the access granularity.

#accesses = ⌈Nₜ / C⌉ × C

#accesses is the access quantity in the paper’s idealization. Nₜ denotes the number of threads requesting data at a time, and C is the cache-line size or access granularity used in that representation. The division expresses how much of that granularity the requests cover. The ceiling brackets round up to include a partly used unit. Multiplication by C expresses the result in multiples of the granularity. The paper motivates the expression with full cache-line coverage. For the actual calibration, it separately checks a benchmark-specific access count against hardware counters.

The next expression uses that access quantity to represent the cost left per access after separating out activation energy.

ε = (E_{MEM} − ΔE_{MEM}) / (⌈Nₜ / C⌉ × C)

ε is the access cost considered in the parallel-access discussion. E_MEM is the energy attributed to the memory level, and ΔE_MEM is its activation offset. Subtraction leaves the energy associated with the varying traffic in this expression. The denominator is the access quantity formed from Nₜ, the participating thread count, and C, the access granularity. The ceiling still includes any partially used unit, and the multiplication scales by that granularity. Dividing by the denominator distributes the traffic-dependent energy over the represented accesses.

The paper uses the discussion to motivate a sweep over the execution configuration. By varying both the block count and the thread count per block, the authors look for the range in which increasing parallelism barely lowers the estimated access cost. They also note that a busier run produces a larger dynamic power signal. That makes it easier to distinguish the effect being measured from fluctuations in the readings. The low estimates used in the workload calculation come from this empirical exercise.

For the practical benchmark check, the authors give an access-count expression based on layout and launch parameters.

#accesses = (array size × #blocks × #threads per block) /
            (stride × access granularity)

#accesses is the benchmark’s predicted access count. array size is the size of the array used in the test. #blocks is the number of launched thread blocks, and #threads per block is the number of threads in each. The multiplications in the numerator scale the array term by the launch dimensions. stride describes the spacing of the pointer chain, and access granularity is the transfer unit at the targeted level. Their product in the denominator scales the numerator according to the benchmark’s layout and transfer convention. The authors compare the resulting prediction with the relevant device counter. A disagreement calls for examining the parameters and the behavior of the target device.

The authors profile the benchmark at each measurement point to perform this check. For a test aimed at a cache, they also verify that the measurement loop has a 100% hit rate at the chosen level. The two checks answer different questions. A high hit rate establishes where the observed requests were served. Agreement with the expected traffic volume establishes that the benchmark generated the expected amount of it. Both matter for the slope, which can be misleading if the horizontal axis counts the wrong transactions or if the vertical axis includes traffic to a different memory.

Reading power and fitting the access cost

The NVIDIA Management Library, or NVML, exposes readings from the internal power sensor. The authors insert delays in the host program before and after the kernel. These intervals help identify when the device is idle and where the active interval begins and ends. The paper distinguishes a sleep interval before GPU memory has been allocated from an idle interval after allocation. Once the kernel starts, the power rises according to the work it performs. The trace returns to an idle interval after the kernel ends, and the allocation is subsequently released.

The illustration uses a representative kernel with multiply-add operations on a large vector. It runs for 10 seconds at the 1065 MHz base clock. Before allocation the A100 is in a sleep state at approximately 55 W. After allocation, the idle interval supplies the power baseline. During execution, the portion of the trace above that baseline represents dynamic energy. The portion corresponding to idle power over the same execution time represents static energy. Reading the trace in this way avoids assigning energy from unrelated time spent preparing the run to the kernel itself.

At base clock, the authors observe comparable power in the sleep and idle phases. At boost clock, they see idle power rise to around 80W and a gradual decline after the memory is released. They lock the GPU to 1065 MHz for the experiments to reduce fluctuations associated with changes in operating mode and with thermal throttling. They repeat each calibration measurement point at least 3 times and report the mean, standard deviation, and observed extrema.

The fit uses energy observations at several traffic volumes for a given memory level and execution configuration. One can picture the observations as points on a graph, with the amount of traffic running along the horizontal axis. A fixed activation cost lifts the fitted line. The extra energy associated with more traffic gives it a slope. Using multiple volumes is valuable because simply dividing a measurement by its access count would mix these contributions. A run with a small volume could appear to have expensive transfers merely because its activation cost is spread over fewer events.

The authors repeat the fit across thread configurations. The low per-access slopes are the calibration outputs. This is an empirical procedure on the specific GPU, instead of a derivation of the access costs from the cache capacity or the memory technology. Those hardware details help explain and design the experiments. The measured changes in energy, paired with the checked transaction counts, supply the cost estimates.

The paper identifies its associated experimental code as ADAC GPU Power Experiments. Its calibration routines and the application assessment play distinct roles. Calibration involves repeated runs as the authors vary the access volume and launch configuration. Afterward, the authors describe obtaining a breakdown for a new application with a pass for counters and a pass for power, while repetitions can still be used to assess variability.

Applying the costs to an application

To analyze a workload, the authors collect its memory traffic counters and obtain an energy measurement over execution. For each of the measured levels they use the calibrated transaction cost and the workload’s corresponding transaction count. The sum of the memory categories is the estimated attribution to data movement and storage. The A100 implementation prices a store at the same cost as a load to the corresponding memory level. The authors adopt that rule because they expect stores usually to cost more, which fits the aim of conservative accounting.

Static energy comes from the idle baseline. The remaining dynamic category is what is left after the estimated memory contributions have been deducted from the measured dynamic energy. Arithmetic is part of that category. So are memory costs beyond the lower estimates and other activity that has not been separately valued by the fit. The authors preserve this category when presenting the application breakdowns, which allows the reader to see how much energy the memory estimate accounts for without assigning the remainder entirely to computation.

Experiments and results

The device, measurements, and comparisons

The experiments use a cloud server with an NVIDIA A100 and an AMD EPYC 7343 host processor. The authors compile the benchmarks with NVIDIA CUDA Toolkit 12.1. In their hardware description, the GPU has 108 SMs, each with 4 streaming multiprocessor subpartitions, and 80 GiB of HBM2 main memory. They give 40 MiB for L2 and 192 kiB for the combined shared-memory and L1 space. The calibration applies to this device with its clock held at the selected base setting.

The benchmark comparisons use the load kernel with different amounts of traffic, different degrees of parallelism, or different target memories. The warm-up-only variant supplies the preparation baseline for the cache measurements. The inactive, allocated device supplies the baseline for static energy. There is also a load-plus-division comparison to test the calibration. For applications, the authors use a reference CUDA matrix multiplication and a reference ResNet-50 training implementation. The training configurations vary numerical precision and execution mode, with full-precision eager execution providing the starting point for the paper’s combined optimization comparison.

The calibration reports energy per memory access in pJ, and it reports the quality and variability of the fits. Application results concern energy spent during the measured kernel or training iteration. Some are expressed as joules and some as fractions, with different denominators for different questions. A share of total GPU energy includes the static baseline in the denominator. A share of dynamic energy omits that baseline. A share of energy attributed to the memory hierarchy is narrower still. Those distinctions are important when comparing a DRAM share with an overall memory share or comparing results across workloads.

Calibration on the A100

The paper illustrates the linear fit with the L1 load benchmark using its 150 kB array. It compares a sparsely threaded run with one at the block’s thread limit for the one-dimensional grid used here. When the authors vary the number of memory accesses, the resulting energy observations follow a line closely. The coefficient of determination, a measure of how closely the fitted line describes the observations, is 0.96 for 1 thread per block and 0.99 for 1024 threads per block. The authors report a maximum standard deviation of around 6 J for the measurements discussed with these traces and describe that spread as small enough relative to the energy being measured.

A100 L1 load calibration by threads per block

The densely threaded benchmark gives the lower fitted energy per L1 access.

A100 L1 load calibration by threads per block1 thread per block: 16001 thread per block16001024 threads per block (this paper): 1071024 threads per block (this paper)107
The numbers
System or settingpJ per access
1 thread per block1600
1024 threads per block (this paper)107

The 1600 pJ value is approximate. It is the fitted L1 cost under sparse execution, while 107 pJ comes from the configuration with more threads working together. The authors describe the potential overestimate from neglecting multithreaded access as near 15×. It is an observation about deriving a cost from these benchmark conditions and applying it to efficient parallel access. It does not measure a change in the energy of an entire application.

The authors sweep additional thread counts for L1 and L2, up to 1024 threads per block. Below 4 threads per block, the L1 cost stays near 1600 pJ. The reasoning behind the early part of the sweep is that those configurations still trigger the same number of sector accesses under the chosen pattern. The sparsely threaded L2 estimates vary between 8490 and 4260 pJ. As the authors increase the thread count, the fitted costs fall and flatten. They describe the L1 plateau at around 107 pJ and the L2 plateau at around 378 pJ. Their final list of minima gives 368 pJ for L2. The two L2 figures are reported for different descriptions of the calibration, the plateau and the final minimum, and the paper gives no further account of the discrepancy.

The authors run the same kind of sweep for DRAM and shared memory. The per-access estimates for both fall as the benchmark allows more threads to participate. Selecting the lowest observed value for each memory gives 82.1 pJ for shared memory, 107 pJ for L1, 368 pJ for L2, and 2090 pJ for DRAM. All four values refer to a calibrated access of 32 bytes. The contrast between L1 and shared memory is particularly informative because they occupy a common physical memory space. The authors suggest the difference in addressing as an explanation. Shared memory is addressed directly, while L1 checks tags to determine whether it holds the requested data.

A reference matrix multiplication

The first application is the matrix multiplication from the CUDA samples. It does not use tensor cores. The authors run it on square matrices with dimensions ranging from 512 to 4096 and use the measured traffic and energy to break down each execution. Across the complete-application experiments, the authors report 10 runs for each application and a standard deviation of less than 1%.

Total energy increases with matrix size. Static energy makes up more than 50% of total GPU energy in these matrix multiplication experiments. Looking only at the dynamic energy, the estimate attributed to memory traffic accounts for more than 50%, with shared memory making the largest contribution among the memory levels. That ranking is a result for the access volumes of this workload. Shared memory has the lowest calibrated unit cost in the study, so the finding illustrates the importance of considering the number of transfers alongside the price per transfer.

At the largest tested size, 4096 × 4096, the paper gives an arithmetic intensity of 1365 FLOPS/byte. Arithmetic intensity describes the amount of arithmetic work relative to the amount of data moved, and the authors interpret that figure as making the workload compute-bound on the A100. The classification concerns what limits execution speed. In the energy accounting, memory still contributes around 30% of the total for this kernel. The proportion is especially informative because it includes static energy in the denominator. A performance classification based on arithmetic intensity therefore leaves open how much energy goes to moving the data used in those calculations.

A ResNet-50 training iteration

The second application is a training iteration of ResNet-50 using a reference implementation from TensorFlow Model Garden. The runs use batches of 512 images. The authors vary two software settings. Full precision uses FP32, whereas the mixed-precision setting uses FP16 as part of training. Eager execution runs operations as called. The other mode uses XLA to compile computations just in time, abbreviated JIT. Crossing the settings gives a comparison of full and mixed precision within each execution mode, as well as a comparison of execution modes within each precision setting.

Static energy is around 40% of total GPU energy across these runs. Among the dynamic contributions, data movement accounts for between 60% and 84% in the configurations where it makes up the majority. The mixed-precision eager run is the exception, at 29%. These are shares of the measured dynamic energy explained by applying the calibrated per-access estimates. They can change because memory energy changes, because the rest of the dynamic energy changes, or because both do.

Estimated memory share of dynamic GPU energy for ResNet-50 training on the A100

Full-precision XLA gives the largest reported share and mixed-precision eager execution gives the smallest.

Estimated memory share of dynamic GPU energy for ResNet-50 training on the A100Mixed precision, eager: 29Mixed precision, eager29Mixed precision, XLA JIT: 60Mixed precision, XLA JIT60Full precision, eager: 80Full precision, eager80Full precision, XLA JIT (this paper): 84Full precision, XLA JIT (this paper)84
The numbers
System or setting% of dynamic GPU energy
Mixed precision, eager29
Mixed precision, XLA JIT60
Full precision, eager80
Full precision, XLA JIT (this paper)84

The star identifies the largest attributed share, which is the comparison in the chart. The underlying energy goal is lower total energy. The 84% value is from the paper’s comparison of eager execution with XLA at full precision. In its comparison of full and mixed precision within XLA, the paper instead reports 83% for the full-precision endpoint. Both figures refer to the full-precision compiled configuration in the prose of the paper. The mixed-precision XLA value is 60% in both comparisons.

The authors report a potential reduction of 90 J in total GPU energy when moving from full-precision eager execution to mixed precision with XLA. They find that both optimizations reduce overall energy, while their effects on the composition of dynamic energy differ. Mixed precision reduces the part assigned to memory substantially. With eager execution the reported memory share goes from 80% to 29%. With XLA, the comparison goes from the reported 83% to 60%. Introducing XLA raises the estimated memory share within each precision setting. This occurs even as overall energy falls. A larger fraction describes a change in the composition of the energy bill and cannot on its own establish an increase in the absolute memory energy.

DRAM accounts for above 70% of the energy attributed to the memory hierarchy in the training experiment. The paper describes the smaller categories using total GPU energy as the denominator. L2 accounts for between 2% and 8% of total energy. L1 accounts for less than 1%, with the exception of mixed precision and XLA, for which the estimate is around 5%. Shared memory accounts for less than 2% of total energy in all the tested configurations. In this experiment, DRAM combines relatively costly individual transactions with enough traffic to dominate the memory attribution. The matrix multiplication assigns its largest memory contribution elsewhere, showing why the calibrated unit costs and the application profile are both needed.

What the ablations show

Thread count changes the estimated access cost

The closest comparison to an ablation of the benchmark design is the thread-count sweep. The authors retain the broad operation, the target level, and the use of pointer chasing while changing how many threads participate. The loop is still meant to issue memory accesses repeatedly. What changes is the opportunity to share a sector and provide enough independent work to keep memory ports active. A higher thread count yields a smaller fitted unit cost at every calibrated level. The L1 comparison between the sparsely and densely threaded configurations makes the implication especially visible. A cost calibrated from a narrow, lightly threaded launch can describe the benchmark well and be a poor rate for accounting for efficient application traffic.

The shape of the sweep supplies more information than the endpoints. Under the chosen address layout, using fewer than 4 threads leaves the number of accessed sectors unchanged in the coalescing example. This helps explain why the early L1 values are similar. The ability to keep reducing the fitted cost beyond the point where a sector can be fully used suggests the importance of the other opportunities discussed by the authors, including concurrent service of different transfers. The sweep brings those effects together. It gives evidence that the benchmark’s execution shape is important, while the individual contributions of coalescing, parallel ports, and activation costs are not measured separately.

The comparison also tests whether a simple fit can describe the data in very different conditions. The higher-thread L1 fit more closely tracks the measured points, and the authors expect a larger dynamic signal with more active threads. The sparsely threaded L2 estimates cover a broad range. The authors therefore use the low region of the observed costs for memory attribution. They have two reasons for favoring that region. It represents the execution regime they want to use as an efficient reference, and active traffic makes its effect easier to resolve in the power readings.

Added division tests whether the baseline behaves consistently

A separate experiment adds a division instruction after each load. The authors choose division because earlier experiments indicate that it costs appreciable energy compared with other arithmetic operations. A relatively large addition is easier to distinguish from fluctuations than an instruction with a small cost. They run the load-plus-division version through the same calibration procedure as the load-only version for L1, L2, and DRAM. They then use the difference between the paired results to estimate the cost of the extra work.

Varying the memory level gives this test its value. L1, L2, and DRAM have distinct load costs. The added arithmetic operation is common to the runs. If the estimated increment depended strongly on which memory supplied the load, it would be difficult to interpret the difference as a stable cost for the additional operation. With few threads per block, the estimates do vary. Above 8 threads per block, the authors report around 2 nJ per division instruction across the tested memory levels. They compare this with an earlier figure of around 3.9 nJ for unsigned division on previous NVIDIA GPUs. Arafa and colleagues on instruction-level energy measurement

The consistent increment in the more heavily threaded runs supports the way the calibration responds to an added operation. The comparison takes place on the measured device and uses the same power sensor and inference procedure for both versions. It is consequently a consistency check on the attribution, with the earlier division measurement serving as a point of comparison rather than as an independent measurement of the A100’s memory costs. Shared memory is absent from the reported division comparison.

The authors also compare their DRAM estimate with an earlier value of 500 pJ per 32B access for HBM2. Their estimate for the A100 is 2090 pJ. They consider the results compatible once the GPU’s memory path and associated overhead, such as the work of cache and DRAM controllers, are taken into account. The comparison helps define what the higher figure represents. The GPU calibration measures energy as traffic through the memory system changes. It does not separately observe how much energy is spent inside the HBM2 device and how much is spent in the circuitry that serves it.

The software comparisons change the composition of energy use

The ResNet-50 experiment controls the training workload while making pairwise comparisons of software settings. One comparison holds eager execution fixed while changing precision. Another holds XLA fixed while changing precision. Both give a lower estimated memory share at mixed precision. The size of that change depends on the execution mode. The paper attributes a substantial part of the energy saving from mixed precision to data movement and storage, and the different shares indicate that the dynamic categories respond differently in eager and compiled execution.

The complementary comparisons hold precision fixed while introducing XLA. Total energy falls, while memory takes a larger share of the dynamic energy. This is possible when some other part of the energy bill shrinks more than the attributed memory portion. The paper’s measurements identify the change in the breakdown. They do not attach a cost to each transformation carried out by the compiler or to each operation within the training iteration. The software comparisons therefore establish how the tested configurations behave as a whole.

The matrix-size sweep examines a different question. It checks whether the memory contribution stays important as the multiplication problem grows, including a case the authors regard as compute-bound. Shared memory remains an important destination for traffic in the reference implementation. The experiment varies problem size within that implementation, so its breakdown concerns the way that code uses the hardware. It complements the training comparison, where the memory level contributing most is DRAM and the software settings change without varying the stated batch size.

Limitations

Limits stated by the authors

The authors define their estimate as a lower bound for data movement and storage. They construct it by using benchmark configurations designed to make effective use of sectors, issue accesses in parallel, and spread the costs of keeping a memory path active. An application may depart from those favorable conditions. Its traffic may be less coalesced, or its memory activity may occur in intervals with fewer concurrent requests. The reported memory estimates therefore express how much energy the traffic accounts for at the selected low rates.

The energy assigned to computation has a corresponding limit. The calculation measures total GPU energy, estimates its static component, and deducts the estimated contributions for the memory levels. The authors explicitly include both computation and extra memory costs in the remaining dynamic category. A reader who wants to establish how much energy was spent on arithmetic alone would need evidence beyond that remainder. The method also leaves the activation term separate from the per-transaction rates passed on to the workload assessment.

The reported implementation calibrates loads. Stores are assigned the corresponding load rate on the premise that stores are typically more expensive. The paper presents this as consistent with the direction of approximation it wants. A store-heavy application can therefore have energy costs that are represented only in part by the breakdown. The paper describes a separate benchmark implementation for stores, but gives no calibrated A100 store rates in the reported experiments.

The authors also make the device dependence explicit. The counters used to check traffic, the capacities that guide the array choices, and the empirical costs belong to the hardware being investigated. Changing the device can change both which events are observable and how the benchmark traverses its memory hierarchy. Likewise, idle and dynamic power depend on the operating condition. The chosen base clock simplifies power measurement and reduces changes in power mode, while the paper’s own trace discussion shows that the idle baseline behaves differently with boost enabled.

Limits visible in the experimental setup

The minimum of the fitted access costs is obtained over the configurations the authors tried. That is a practical reference for low-cost operation. The experiments do not establish that it is a physical minimum across all possible GPU workloads, clock settings, temperatures, or request sequences. Nor do the reported fit statistics establish that a given application can reach that rate for every access. The evidence supports a conservative attribution under the stated assumptions, with the uncertainty of that attribution in arbitrary workloads left unquantified.

The power sensor measures the combined behavior of the device while the benchmark is active. The slope from a traffic sweep can include activity in circuitry used to generate, route, or service the requests. That interpretation is consistent with the paper’s discussion of controllers in its HBM2 comparison, and with its explanation of the different costs of using shared memory and L1. The fitted cost is a rate for a class of GPU activity identified by the target memory. The experiment does not isolate a device-level cost for the memory cells, a separate cache-tag cost, or individual controller costs.

Assigning traffic by cache hits also leaves some costs unallocated. A missed lookup can spend energy before the request reaches the level that satisfies it. A hit-based count gives a tractable way to choose the destination of the transfer in the accounting. It has insufficient detail to assign an explicit cost to every step along the request path. The power measurement still includes the work done along that path. The portion absent from the per-level estimates can contribute to the remaining dynamic energy.

The regression treats incremental energy as linear in traffic for a fixed benchmark configuration. The L1 examples support a close linear fit in the tested range. A full application can interleave reads, writes, arithmetic, and changes of destination in ways the benchmark avoids. The method transfers the fitted rates to such applications, but the consistency check adds only one type of arithmetic operation to the load stream. It provides limited evidence about how simultaneous activity in an application affects marginal costs. Repetition quantifies how much the measured runs vary. It cannot alone quantify the uncertainty of attributing the resulting energy among interacting components.

Several reporting details also restrict precision. The authors give around 378 pJ for the L2 plateau and 368 pJ in their final minimum list. The latter is the figure identified as the selected minimum. The training discussion gives both 83% and 84% for the full-precision XLA memory share in different comparisons. The paper does not supply enough detail to reconcile those values. These differences leave the qualitative comparisons intact, but a reader who needs an exact value for either setting has to preserve the qualification that accompanies the number.

Finally, the application evidence covers a CUDA sample multiplication and a ResNet-50 training iteration with a particular batch size on the A100. The reference multiplication omits tensor cores, and the training measurement concerns an iteration instead of the energy required for an entire training run. These experiments show that the memory contribution can remain substantial across different kinds of work and after the tested software changes. They leave open how the breakdown would look for other implementations, accelerators, training workloads, or operating settings. The contrast between shared memory in matrix multiplication and DRAM in training is itself evidence for conditioning any claim about the dominant memory on the workload being measured.

What came after

The paper’s later research uptake is undocumented in the available record of citing work. The experiments establish the method on the A100 and apply it to the workloads described above. There is no documented successor here from which to trace a replication, an extension to other hardware, or a use of the calibrated estimates in a new system.

Cite

Cite as Paul Delestrac, Jonathan Miquel, Debjyoti Bhattacharjee, Diksha Moolchandani, Francky Catthoor, Lionel Torres and David Novo. 2024. Analyzing GPU Energy Consumption in Data Movement and Storage. IEEE International Conference on Application-specific Systems, Architectures and Processors (ASAP).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.1109/asap61560.2024.00038

@inproceedings{delestrac2024analyzing,
  title = {{Analyzing GPU Energy Consumption in Data Movement and Storage}},
  author = {Paul Delestrac, Jonathan Miquel, Debjyoti Bhattacharjee, Diksha Moolchandani, Francky Catthoor, Lionel Torres and David Novo},
  booktitle = {IEEE International Conference on Application-specific Systems, Architectures and Processors (ASAP)},
  year = {2024},
  doi = {10.1109/asap61560.2024.00038},
  url = {https://doi.org/10.1109/asap61560.2024.00038}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/delestrac-2024-analyzing-gpu-energy-consumption-data/