How to Profile GPU Kernels to Find the Real Bottleneck

GPU profiling separates compute-bound from memory-bound kernels. Nsight Compute roofline analysis shows where a kernel sits and what would move it.

How to Profile GPU Kernels to Find the Real Bottleneck
Written by TechnoLynx Published on 22 Apr 2026

Why wall-clock timing is not profiling

A CUDA kernel takes 12 milliseconds to execute. Is that slow? The question is unanswerable without context. If the kernel is performing 500 billion floating-point operations and the GPU’s peak throughput is 312 TFLOPS, the theoretical minimum is 1.6 milliseconds — the kernel is achieving 13% of peak, and there is significant room for improvement. If the kernel is memory-bandwidth-bound, performing element-wise operations on 4 GB of data on a GPU with 2 TB/s memory bandwidth, the theoretical minimum is 2 milliseconds — the kernel is achieving 17% of the memory bandwidth ceiling, and the optimisation target is memory access patterns rather than compute efficiency.

Wall-clock timing tells you how long the kernel took. Profiling tells you why it took that long — and what specific intervention would make it faster. Without profiling, GPU optimisation is guessing. With profiling, it is engineering.

The roofline model: where does your kernel sit?

The roofline model is the foundational framework for GPU kernel performance analysis. It maps every kernel to a two-dimensional space defined by two hardware limits: compute throughput (FLOPS) and memory bandwidth (bytes/second). The kernel’s arithmetic intensity — the ratio of compute operations to memory accesses — determines which limit the kernel is constrained by.

Compute-bound kernels have high arithmetic intensity: they perform many operations per byte of data accessed. Large matrix multiplications (GEMM), convolutions with large filter sizes, and dense attention computations fall into this category. For these kernels, the optimisation target is compute efficiency: are the tensor cores being used? Is the warp execution efficient? Are there unnecessary branches or divergent execution paths?

Memory-bound kernels have low arithmetic intensity: they perform few operations per byte accessed. Element-wise operations (ReLU, sigmoid, addition), batch normalisation, and small matrix operations fall into this category. For these kernels, the optimisation target is memory throughput: are memory accesses coalesced? Is the data layout cache-friendly? Can multiple operations be fused to reuse data in registers or shared memory?

Nsight Compute generates the roofline chart automatically for any profiled kernel. The kernel appears as a point on the chart; its position relative to the compute ceiling and memory bandwidth ceiling indicates which limit is binding and how much headroom remains. A kernel sitting at 80% of the memory bandwidth ceiling is well-optimised for a memory-bound workload — further gains require reducing the memory access volume (through fusion or algorithmic change), not improving the access pattern. A kernel sitting at 20% of the compute ceiling is poorly optimised — there is a 5× potential improvement from better compute utilisation.

The profiling workflow

We follow a systematic profiling methodology that moves from system-level to kernel-level analysis. This progression is important: optimising an individual kernel that contributes 2% of total execution time is wasted effort if the system-level bottleneck is host-device serialisation.

Step 1: System-level timeline (Nsight Systems). Run the workload under Nsight Systems to produce a timeline of GPU activity: kernel launches, memory transfers, synchronisation events, and idle periods. The timeline reveals the macro-level performance structure. Questions this step answers: What fraction of the total execution time is the GPU active? Where are the idle gaps? Which kernels dominate the execution time? Is there host-device serialisation that could be overlapped?

Step 2: Identify the dominant kernels. Sort kernels by cumulative execution time. Typically, 3–5 kernels account for 80% or more of the GPU execution time. These are the optimisation targets. Optimising kernels that do not appear in the top contributors has negligible impact on total execution time.

Step 3: Kernel-level profiling (Nsight Compute). Profile each dominant kernel individually with Nsight Compute. The detailed analysis includes roofline positioning, achieved occupancy, memory throughput breakdown (global, shared, L1, L2), warp execution efficiency, and instruction mix. For each kernel, the profiler identifies the specific bottleneck and often suggests the relevant optimisation.

Step 4: Apply targeted optimisations. Based on the profiling data, apply the specific optimisation that addresses the identified bottleneck. For a memory-bound kernel: improve coalescing, fuse with adjacent operations, or change the data layout. For a compute-bound kernel: enable tensor core usage, reduce warp divergence, or increase ILP (instruction-level parallelism). For an occupancy-limited kernel: reduce register or shared memory usage per thread.

Step 5: Re-profile and iterate. After applying the optimisation, re-profile to verify the improvement and identify the next bottleneck. GPU optimisation is iterative — fixing one bottleneck often reveals the next. The process continues until the kernel’s performance is within acceptable distance of the theoretical ceiling, or until the dominant bottleneck shifts to a different kernel or a system-level constraint.

The GPU underutilisation patterns we encounter in production workloads are identified through this workflow. Without it, the team is optimising by intuition rather than by measurement.

Common profiling findings and their fixes

From our GPU Performance Audit engagements, the most common profiling findings are:

Uncoalesced global memory access. Threads in a warp access non-contiguous memory locations, resulting in multiple memory transactions where one would suffice. The fix: restructure the data layout (Array of Structures to Structure of Arrays conversion) or modify the access pattern to ensure consecutive threads access consecutive memory addresses. Typical improvement: 2–4× memory throughput for the affected kernel.

Tensor core underutilisation. The kernel performs matrix multiplications in FP32 without using tensor cores, despite running on hardware that supports them (Volta and later). The fix: convert to mixed-precision (FP16 input, FP32 accumulate) and use CUDA’s WMMA API or cuBLAS’s tensor core-enabled routines. Typical improvement: 4–8× throughput for the matrix multiplication operations.

Excessive kernel launch overhead. Hundreds or thousands of small kernels are launched sequentially, with the CPU overhead of each launch (5–15 microseconds) exceeding the GPU execution time of the kernel. The fix: fuse small kernels into larger ones, or use CUDA graphs to batch the launch sequence into a single replayable graph. Typical improvement: 2–10× reduction in total execution time for launch-overhead-dominated workloads.

Register pressure causing spills. The kernel uses more registers per thread than the hardware provides, causing register spills to local memory (which is backed by global memory and is 100× slower). The fix: refactor the kernel to reduce register usage — simplify expressions, reduce loop unrolling, or split the kernel into stages that require fewer simultaneous live variables. Typical improvement: 1.5–3× throughput recovery.

What profiling tells you that benchmarks do not

Benchmark numbers — training throughput, inference latency, images/second — tell you the current performance. Profiling tells you the achievable performance and the specific path to reach it. The gap between current and achievable is the optimisation opportunity, and its magnitude determines whether the intervention is worth the engineering investment.

We have seen profiling reveal opportunities ranging from negligible (the workload is already well-optimised, within 10% of the hardware ceiling) to transformative (the workload is at 15% of peak, with a clear path to 60% through targeted kernel optimisation and memory layout changes). The profiling data determines which situation you are in — and prevents the expensive mistake of planning GPU memory for training or procuring more hardware when the existing hardware is underutilised.

The first step is always the same: profile the workload, identify the dominant bottleneck, and quantify the gap between current and achievable performance. Everything else follows from that data. Our GPU engineering practice can help you get started.

The Hidden Cost of GPU Underutilisation

The Hidden Cost of GPU Underutilisation

21/04/2026

Most GPU workloads use 30–50% of available compute. Without profiling, the waste is invisible. Bandwidth, occupancy, and serialisation are the root causes.

CUDA vs OpenCL vs SYCL: Choosing a GPU Compute API

CUDA vs OpenCL vs SYCL: Choosing a GPU Compute API

20/04/2026

CUDA delivers the deepest optimisation on NVIDIA hardware. OpenCL and SYCL offer portability. Choose based on lock-in tolerance and performance needs.

Cost, Efficiency, and Value Are Not the Same Metric

Cost, Efficiency, and Value Are Not the Same Metric

17/04/2026

Performance per dollar. Tokens per watt. Cost per request. These sound like the same thing said differently, but they measure genuinely different dimensions of AI infrastructure economics. Conflating them leads to infrastructure decisions that optimize for the wrong objective.

Precision Is an Economic Lever in Inference Systems

Precision Is an Economic Lever in Inference Systems

17/04/2026

Precision isn't just a numerical setting — it's an economic one. Choosing FP8 over BF16, or INT8 over FP16, changes throughput, latency, memory footprint, and power draw simultaneously. For inference at scale, these changes compound into significant cost differences.

Precision Choices Are Constrained by Hardware Architecture

Precision Choices Are Constrained by Hardware Architecture

17/04/2026

You can't run FP8 inference on hardware that doesn't have FP8 tensor cores. Precision format decisions are conditional on the accelerator's architecture — its tensor core generation, native format support, and the efficiency penalties for unsupported formats.

Steady-State Performance, Cost, and Capacity Planning

Steady-State Performance, Cost, and Capacity Planning

17/04/2026

Capacity planning built on peak performance numbers over-provisions or under-delivers. Real infrastructure sizing requires steady-state throughput — the predictable, sustained output the system actually delivers over hours and days, not the number it hit in the first five minutes.

How Benchmark Context Gets Lost in Procurement

How Benchmark Context Gets Lost in Procurement

16/04/2026

A benchmark result starts with full context — workload, software stack, measurement conditions. By the time it reaches a procurement deck, all that context is gone. The failure mode is not wrong benchmarks but context loss during propagation.

Building an Audit Trail: Benchmarks as Evidence for Governance and Risk

Building an Audit Trail: Benchmarks as Evidence for Governance and Risk

16/04/2026

High-value AI hardware decisions need traceable evidence, not slide-deck bullet points. When benchmarks are documented with methodology, assumptions, and limitations, they become auditable institutional evidence — defensible under scrutiny and revisitable when conditions change.

The Comparability Protocol: Why Benchmark Methodology Defines What You Can Compare

The Comparability Protocol: Why Benchmark Methodology Defines What You Can Compare

16/04/2026

Two benchmark scores can only be compared if they share a declared methodology — the same workload, precision, measurement protocol, and reporting conditions. Without that contract, the comparison is arithmetic on numbers of unknown provenance.

A Decision Framework for Choosing AI Hardware

A Decision Framework for Choosing AI Hardware

16/04/2026

Hardware selection is a multivariate decision under uncertainty — not a score comparison. This framework walks through the steps: defining the decision, matching evaluation to deployment, measuring what predicts production, preserving tradeoffs, and building a repeatable process.

How Benchmarks Shape Organizations Before Anyone Reads the Score

How Benchmarks Shape Organizations Before Anyone Reads the Score

16/04/2026

Before a benchmark score informs a purchase, it has already shaped what gets optimized, what gets reported, and what the organization considers important. Benchmarks function as decision infrastructure — and that influence deserves more scrutiny than the number itself.

Accuracy Loss from Lower Precision Is Task‑Dependent

Accuracy Loss from Lower Precision Is Task‑Dependent

16/04/2026

Reduced precision does not produce a uniform accuracy penalty. Sensitivity depends on the task, the metric, and the evaluation setup — and accuracy impact cannot be assumed without measurement.

Precision Is a Design Parameter, Not a Quality Compromise

16/04/2026

Numerical precision is an explicit design parameter in AI systems, not a moral downgrade in quality. This article reframes precision as a representation choice with intentional trade-offs, not a concession made reluctantly.

Mixed Precision Works by Exploiting Numerical Tolerance

16/04/2026

Not every multiplication deserves 32 bits. Mixed precision works because neural network computations have uneven numerical sensitivity — some operations tolerate aggressive precision reduction, others don't — and the performance gains come from telling them apart.

Throughput vs Latency: Choosing the Wrong Optimization Target

16/04/2026

Throughput and latency are different objectives that often compete for the same resources. This article explains the trade-off, why batch size reshapes behavior, and why percentiles matter more than averages in latency-sensitive systems.

Quantization Is Controlled Approximation, Not Model Damage

16/04/2026

When someone says 'quantize the model,' the instinct is to hear 'degrade the model.' That framing is wrong. Quantization is controlled numerical approximation — a deliberate engineering trade-off with bounded, measurable error characteristics — not an act of destruction.

GPU Utilization Is Not Performance

15/04/2026

The utilization percentage in nvidia-smi reports kernel scheduling activity, not efficiency or throughput. This article explains the metric's exact definition, why it routinely misleads in both directions, and what to pair it with for accurate performance reads.

FP8, FP16, and BF16 Represent Different Operating Regimes

15/04/2026

FP8 is not just 'half of FP16.' Each numerical format encodes a different set of assumptions about range, precision, and risk tolerance. Choosing between them means choosing operating regimes — different trade-offs between throughput, numerical stability, and what the hardware can actually accelerate.

Peak Performance vs Steady‑State Performance in AI

15/04/2026

AI systems rarely operate at peak. This article defines the peak vs. steady-state distinction, explains when each regime applies, and shows why evaluations that capture only peak conditions mischaracterize real-world throughput.

The Software Stack Is a First‑Class Performance Component

15/04/2026

Drivers, runtimes, frameworks, and libraries define the execution path that determines GPU throughput. This article traces how each software layer introduces real performance ceilings and why version-level detail must be explicit in any credible comparison.

The Mythology of 100% GPU Utilization

15/04/2026

Is 100% GPU utilization bad? Will it damage the hardware? Should you be worried? For datacenter AI workloads, sustained high utilization is normal — and the anxiety around it usually reflects gaming-era intuitions that don't apply.

Why Benchmarks Fail to Match Real AI Workloads

15/04/2026

The word 'realistic' gets attached to benchmarks freely, but real AI workloads have properties that synthetic benchmarks structurally omit: variable request patterns, queuing dynamics, mixed operations, and workload shapes that change the hardware's operating regime.

Why Identical GPUs Often Perform Differently

15/04/2026

'Same GPU' does not imply the same performance. This article explains why system configuration, software versions, and execution context routinely outweigh nominal hardware identity.

Training and Inference Are Fundamentally Different Workloads

15/04/2026

A GPU that excels at training may disappoint at inference, and vice versa. Training and inference stress different system components, follow different scaling rules, and demand different optimization strategies. Treating them as interchangeable is a design error.

Performance Ownership Spans Hardware and Software Teams

15/04/2026

When an AI workload underperforms, attribution is the first casualty. Hardware blames software. Software blames hardware. The actual problem lives in the gap between them — and no single team owns that gap.

Performance Emerges from the Hardware × Software Stack

15/04/2026

AI performance is an emergent property of hardware, software, and workload operating together. This article explains why outcomes cannot be attributed to hardware alone and why the stack is the true unit of performance.

Power, Thermals, and the Hidden Governors of Performance

14/04/2026

Every GPU has a physical ceiling that sits below its theoretical peak. Power limits, thermal throttling, and transient boost clocks mean that the performance you read on the spec sheet is not the performance the hardware sustains. The physics always wins.

Why AI Performance Changes Over Time

14/04/2026

That impressive throughput number from the first five minutes of a training run? It probably won't hold. AI workload performance shifts over time due to warmup effects, thermal dynamics, scheduling changes, and memory pressure. Understanding why is the first step toward trustworthy measurement.

CUDA, Frameworks, and Ecosystem Lock-In

14/04/2026

Why is it so hard to switch away from CUDA? Because the lock-in isn't in the API — it's in the ecosystem. Libraries, tooling, community knowledge, and years of optimization create switching costs that no hardware swap alone can overcome.

GPUs Are Part of a Larger System

14/04/2026

CPU overhead, memory bandwidth, PCIe topology, and host-side scheduling routinely limit what a GPU can deliver — even when the accelerator itself has headroom. This article maps the non-GPU bottlenecks that determine real AI throughput.

Why AI Performance Must Be Measured Under Representative Workloads

14/04/2026

Spec sheets, leaderboards, and vendor numbers cannot substitute for empirical measurement under your own workload and stack. Defensible performance conclusions require representative execution — not estimates, not extrapolations.

Low GPU Utilization: Where the Real Bottlenecks Hide

14/04/2026

When GPU utilization drops below expectations, the cause usually isn't the GPU itself. This article traces common bottleneck patterns — host-side stalls, memory-bandwidth limits, pipeline bubbles — that create the illusion of idle hardware.

Why GPU Performance Is Not a Single Number

14/04/2026

AI GPU performance is multi-dimensional and workload-dependent. This article explains why scalar rankings collapse incompatible objectives and why 'best GPU' questions are structurally underspecified.

What a GPU Benchmark Actually Measures

14/04/2026

A benchmark result is not a hardware measurement — it is an execution measurement. The GPU, the software stack, and the workload all contribute to the number. Reading it correctly requires knowing which parts of the system shaped the outcome.

Why Spec‑Sheet Benchmarking Fails for AI

14/04/2026

GPU spec sheets describe theoretical limits. This article explains why real AI performance is an execution property shaped by workload, software, and sustained system behavior.

NVIDIA Data Centre GPUs: what they are and why they matter

19/03/2026

NVIDIA data centre GPUs explained: architecture differences, when to choose them over consumer GPUs, and how workload type determines the right GPU configuration in a data centre.

CUDA vs OpenCL: Which to Use for GPU Programming

16/03/2026

CUDA and OpenCL compared for GPU programming: programming models, memory management, tooling, ecosystem fit, portability trade-offs, and a practical decision framework.

Planning GPU Memory for Deep Learning Training

16/02/2026

GPU memory estimation for deep learning: calculating weight, activation, and gradient buffers so you can predict whether a training run fits before it crashes.

CUDA AI for the Era of AI Reasoning

11/02/2026

How CUDA underpins AI inference: kernel execution, memory hierarchy, and the software decisions that determine whether a model uses the GPU efficiently or wastes it.

Choosing Vulkan, OpenCL, SYCL or CUDA for GPU Compute

28/01/2026

A practical comparison of Vulkan, OpenCL, SYCL and CUDA, covering portability, performance, tooling, and how to pick the right path for GPU compute across different hardware vendors.

GPU vs TPU vs CPU: Performance and Efficiency Explained

10/01/2026

CPU, GPU, and TPU compared for AI workloads: architecture differences, energy trade-offs, practical pros and cons, and a decision framework for choosing the right accelerator.

GPU Computing for Faster Drug Discovery

7/01/2026

GPU computing in drug discovery: how parallel workloads accelerate molecular simulation, docking calculations, and deep learning models for compound property prediction.

The Role of GPU in Healthcare Applications

6/01/2026

Where GPUs are essential in healthcare AI: medical image processing, genomic workloads, and real-time inference that CPU-only architectures cannot sustain at production scale.

Unlocking XR’s True Power with Smarter GPU Optimisation

9/04/2025

GPU optimisation for real-time rendering workloads: profiling GPU-bound bottlenecks, memory bandwidth constraints, and frame scheduling decisions in XR systems.

Maximising Efficiency with AI Acceleration

21/10/2024

Find out how AI acceleration is transforming industries. Learn about the benefits of software and hardware accelerators and the importance of GPUs, TPUs, FPGAs, and ASICs.

Enhance Your Applications with Promising GPU APIs

16/08/2024

CUDA, OpenCL, Metal, and Vulkan compared for GPU compute: when to use each API and what the trade-offs are for different application targets and hardware platforms.

Back See Blogs
arrow icon