Practical technical guides / Recent development: arXiv 2611.09280 (6 November 2026), issues in GPU kernel libraries for LLM systems

Most GPU Kernel Library Bugs in One Study Began Outside the Kernel: Validate the Whole Stack Before Serving

In a 6 November 2026 study of 300 GPU kernel library issues, 60.33 percent began in the build or runtime stack. A release check: versions together, edge shapes, tolerances.

By Sandeep Belgavi · Published 2026-11-10

In a 6 November 2026 study of 300 GPU kernel library issues, 60.33 percent began in the build or runtime stack. A release check: versions together, edge shapes, tolerances.

The kernel is rarely the whole story

When a model server starts returning wrong answers or refuses to start after an upgrade, attention goes to the attention kernel, the GEMM library or the quantisation code. A preprint submitted on 6 November 2026 by Yanjie Gao and colleagues, "An Empirical Study of Issues in GPU Kernel Libraries for LLM Systems" (arXiv 2611.09280v1), suggests looking wider. The authors manually analysed 300 GitHub issue reports, with their discussions and fixes, from seven libraries that LLM serving and training depend on: FlashInfer, FlashAttention, Triton, CUTLASS, DeepGEMM, xFormers and bitsandbytes.

Their headline finding is that 60.33 percent of the sampled issues originate in the compiler and build system or in the runtime environment, not in kernel code. This article summarises the study's symptom and cause breakdown, then turns its implications into a release check for a serving image: record the whole stack, check it against declared requirements, and compare kernel outputs with a reference on boundary shapes with tolerances that fit the data type. The study's figures are the authors'; the checks and code are original, and the code uses synthetic stacks and pure-Python stand-ins, not GPUs. Sources are dated on or before 10 November 2026.

What the study found

Symptoms of the 300 issues:

SymptomShare
Deployment failure27.33 percent
Build failure24.33 percent
Crash21.00 percent
Incorrect functionality17.67 percent
Performance degradation7.67 percent
Hang2.00 percent

Root causes fell into three dimensions: the kernel library itself (39.67 percent), the runtime environment (33.33 percent) and the compiler and build system (27.00 percent). Within the runtime environment, software incompatibility was the largest single root-cause category of all, at 76 issues (25.33 percent): mismatches among GPU drivers, CUDA or ROCm runtimes, deep learning frameworks, operating systems and ABIs. Hardware incompatibility accounted for 24 issues (8 percent).

Two of the paper's examples make the categories concrete. In one FlashAttention report, a call failed at runtime even though CUDA 11.6 was installed on the host, because the installed PyTorch package had been compiled against CUDA 11.3, below the library's requirement; installing a PyTorch build for CUDA 11.6 fixed it. In a bitsandbytes report, an INT8 matrix multiplication failed on a V100 because that path needed INT8 Tensor Cores the V100 does not have; no software version could supply the missing hardware.

The authors draw three implications that shape the rest of this article: compatibility checks must consider package, framework, compiler, CUDA and driver versions together with the GPU architecture; kernel specialisation imposes implicit constraints on shapes, layouts, aliasing and resources, so boundary cases need explicit tests; and current practice is weak at catching low-precision numerical problems and hardware-specific failures. They also note that more than half of the symptoms (deployment and build failures) appear before the kernel ever runs on the device.

Check one: the stack, recorded and compared

The FlashAttention example shows why "which CUDA is installed?" is the wrong question. Three different versions can be in play: the CUDA runtime on the host, the CUDA version the framework wheel was built against, and the newest CUDA the driver supports. Add the GPU's compute capability and the framework version each compiled extension was built for, and you have the facts a compatibility check needs. Record them together, for every image on every node type, at build time and again at startup.

def check_stack(stack, requires):
    problems = []
    if v(stack['compute_capability']) < v(requires['min_compute_capability']):
        problems.append(f"GPU compute capability {stack['compute_capability']} is below the "
                        f"{requires['min_compute_capability']} the kernel path needs")
    if v(stack['framework_build_cuda']) < v(requires['min_framework_build_cuda']):
        problems.append(f"framework was built against CUDA {stack['framework_build_cuda']}, the library needs "
                        f"{requires['min_framework_build_cuda']} or newer")
    if v(stack['cuda_runtime']) > v(stack['driver_max_cuda']):
        problems.append(f"CUDA runtime {stack['cuda_runtime']} is newer than the driver supports ({stack['driver_max_cuda']})")
    if stack['library_built_for_framework'] != stack['framework_version']:
        problems.append('kernel library binary was built for a different framework release (ABI risk)')
    return problems

The companion example runs it on five synthetic stacks. One passes; the other four fail with messages that name the mismatched pair: a framework built for CUDA 11.3 on a host with CUDA 11.6 (the shape of the paper's FlashAttention case), the same image scheduled onto a compute capability 7.0 GPU, a runtime newer than the node's driver, and a framework upgrade whose compiled kernel library was not rebuilt. Versions are compared numerically, so 11.10 is newer than 11.6, a small detail that string comparison gets wrong.

The requirements themselves come from each library's published support matrix. Keep them as data next to the image definition, and fail the build, not the first request, when a combination is outside them. A failure message that names the missing capability is one of the paper's explicit recommendations.

Check two: outputs against a reference, on the shapes that break

A successful launch does not prove a correct result, as the paper puts it. The standard technique is a differential test: feed the optimised kernel and a simple reference the same inputs and compare. Two details decide whether such a test finds anything.

The first is the shapes. Specialised kernels tile their work, and bugs live at the edges of tiles. The companion example includes a tiled dot-product kernel with a deliberate bug: it skips the last partial tile of 64 elements. On lengths 64, 128, 512 and 4,096 it passes every case. On lengths 1, 63, 65, 1,000 and 4,097 it fails most or all of them.

Kernel stand-inAligned lengths (64 to 4,096)Boundary lengths (1 to 4,097)
Wide accumulation, half-precision output0 failures0 failures
Half-precision accumulationfails 11 of 20 cases at 4,096 onlyfails at 1,000 and 4,097
Tiled, drops the last partial tile0 failuresfails at every boundary length

The second is the tolerance. Compare against a float64 reference of the same rounded inputs, with absolute and relative tolerances chosen for the output data type. Too tight, and correct half-precision kernels fail on output rounding alone; too loose, and accumulation error passes. In the example, a kernel that accumulates in half precision passes every length up to 512 and fails at 4,096, where the error from thousands of roundings reaches about 0.5. A test suite that only uses short reductions would never see it. The paper says investigation requires making a kernel's effective precision and accumulation mode explicit and comparing with a reference using equivalent numerical semantics and appropriate tolerances.

def run_contract(kernel, lengths, cases=20, seed=3):
    rng = random.Random(seed)
    for k in lengths:
        for _ in range(cases):
            a = [rng.uniform(-1, 1) for _ in range(k)]
            b = [rng.uniform(-1, 1) for _ in range(k)]
            want = ref_dot([f16(x) for x in a], [f16(y) for y in b])   # float64 reference
            got = kernel(a, b)
            ...  # count failures where abs(got - want) > atol + rtol * abs(want)

On real hardware the same structure applies with real kernels and the framework's reference implementation: a small fixed set of inputs per operator, including unequal sequence lengths in a batch, lengths just above and below each tile size, the largest context you serve, and every data type you deploy.

A release gate for serving images

Put the two checks where they catch problems before customers do.

  1. At image build: record the stack manifest, check it against the libraries' requirements, and fail the build on any mismatch.
  2. At node startup: re-record the facts the build could not know (driver, GPU model and compute capability) and refuse to serve if the combination is unsupported.
  3. Before routing traffic: run the output contract on the node, on boundary shapes and every deployed data type, and compare a short set of fixed prompts with recorded outputs from the previous release using a tolerance, not exact equality.
  4. Keep the logs. The paper notes that a missing build dependency once made compilation slow enough to look stuck; preserved build logs and compiler artefacts separate a hang from slow progress.

For Belgavi's Book Store, where a small model drafts help-desk replies, this gate is a few minutes per release. It would have caught every failure in the companion example, and it turns "the new image is weird" into a message that says which pair of versions disagrees.

What the study does not show

The sample is 300 issues chosen by the authors from seven libraries' public trackers. Reported issues over-represent problems users hit and could describe, and under-represent silent numerical errors nobody noticed, so the shares describe the sample, not the frequency of failures in production. The study also does not measure how much each check would have prevented. The release gate above is a reasonable response to the study's findings, not something the study evaluated.

Primary references and authorship

Sources dated on or before 10 November 2026. Original explanation and synthetic examples by Sandeep Belgavi. Companion code: Sandeep-BA/agent-decision-lab/examples/python/kernel_stack_checks. Views are my own and do not represent any employer, past or present.