TensorRT-LLM fails at model init because the FlashInfer FMHA kernel has no build for the GPU architecture
TensorRT-LLM delegates fused attention to FlashInfer, whose FMHA runner is compiled for a specific set of architectures. On a device outside that set the runner raises an unsupported-architecture error from its own header, so the model finishes loading and then fails to serve.
The bundled FlashInfer build has no kernel compiled for this compute capability. Move to an image whose kernels cover the device, or serve on a generation it does cover; no TensorRT-LLM flag adds the missing object code.
What this failure is
A runtime rejection in which the FlashInfer fused multi-head attention runner bundled with TensorRT-LLM finds no compiled kernel for the target GPU architecture and raises rather than falling back, after model initialisation has already succeeded.
Why it happens (the mechanism)
Attention kernels are compiled ahead of time for an enumerated list of architectures and dispatched at runtime. Dispatch either finds an entry for the device or it does not, and there is no generic path to degrade to, so the runner raises from inside its own header. Because the enumeration belongs to the bundled kernel library rather than to the framework, nothing in the TensorRT-LLM invocation reflects it.
What you'll observe
- The container release is current and the model is supported, yet initialisation fails on this card
- The error is raised from a FlashInfer header path, which does not appear in the TensorRT-LLM command that was run
- Both a small inference card and a new flagship can hit it, which makes the pattern look inconsistent
- Model loading reports success first, so the failure looks like a serving problem rather than a support one
Common symptoms and what they mean
| Symptom | Why it happens |
|---|---|
| RuntimeError: Error in function 'TllmGenFmhaRunner' at flashinfer/trtllm/fmha/fmhaRunner.cuh: Unsupported architecture | Fused attention is not written per model; it is a prebuilt kernel selected at runtime. The build carries object code for an enumerated list of architectures, and a device outside that list has nothing to dispatch to, so the runner refuses rather than falling back. |
| Failure occurring after a model init total timing line, not during weight download | The list is a property of the bundled FlashInfer build rather than of TensorRT-LLM or of the checkpoint, which is why the error names a header inside FlashInfer and why nothing in the invocation hints at it. |
| The same checkpoint serving normally on a different GPU generation with an unchanged command | Coverage is not monotonic with newness. Hardware released after the image predates nothing it can use, and modest inference parts are sometimes left out of a build aimed at data-centre silicon, so both the newest and the smallest devices fail while the middle of the range works. |
| Quantization configuration naming NVFP4 with modelopt as the producer | Fused attention is not written per model; it is a prebuilt kernel selected at runtime. The build carries object code for an enumerated list of architectures, and a device outside that list has nothing to dispatch to, so the runner refuses rather than falling back. |
Which systems are affected
- GPUs whose compute capability is outside the set the bundled FlashInfer FMHA was compiled for, in both directions
- Newer silicon released after the container image, such as SM120 Blackwell workstation parts
- Smaller inference cards such as the L4, which are sometimes omitted from a kernel's build list
- Release-candidate TensorRT-LLM containers, whose bundled kernel coverage moves between builds
How to confirm this is the problem
Apply the following checklist to a small reproduction: each box below is a positive signal that you are looking at this exact failure rather than a sibling in the same taxonomy.
- ✓Query the device compute capability and check it against the architecture list the installed FlashInfer build advertises. A device absent from that list is the whole explanation.
- ✓Run the identical image and command on a different GPU generation. Success there separates a kernel coverage gap from a problem with the model or the configuration.
- ✓Confirm the failure occurs after the model init timing line. A rejection at that point is kernel dispatch rather than weight loading.
Example training logs (fingerprint)
RuntimeError: Error in function 'TllmGenFmhaRunner' at /usr/local/lib/python3.12/dist-packages/flashinfer/data/include/flashinfer/trtllm/fmha/fmhaRunner.cuh:37: Unsupported architecture
Model init total -- 21.36s
[TRT-LLM] [W] [quantize] Inline 'config.json.quantization_config' diverges from 'hf_quant_config.json'Timestamps and exact values vary across runs, but the pattern. An info-level start, an early WARN, an ERROR carrying the symptom. Is the actual fingerprint you should alert on. The Denpex platform flags this combination automatically.
Root cause, fix & prevention, signed in
Sign up free to see why this failure really happens, the exact remediation steps, and the production-grade prevention pattern. You also get 3 free full diagnoses for your own training logs.
Sign up free. Unlock the full analysisNo credit card · 3 free diagnoses · Instant access
Why the recommended fix works
Changing to a build that enumerates the architecture supplies the object code dispatch was looking for, which is the only thing missing. Selecting a different attention provider works for the same reason: it moves the request to a kernel set that does cover the device. Neither is a tuning change, because nothing about the model or its configuration was wrong.
Code examples
// Typical pattern:
import torch.optim as optim
optimizer = optim.AdamW(model.parameters(), lr=3e-4)
scheduler = optim.lr_scheduler.CosineAnnealingLR(optimizer, T_max=num_training_steps)
for step in range(num_training_steps):
optimizer.zero_grad()
loss = model(batch)
loss.backward()
optimizer.step()
scheduler.step()Adapt the snippet to your framework. The same pattern holds for PyTorch Lightning, Hugging Face Trainer, DeepSpeed, Megatron-LM, and vLLM training wrappers. Where the wrapper exposes a config flag (for examplelr_scheduler_type in Trainer), prefer the flag over the imperative API to keep the schedule declarative and reproducible.
Best practices by model family
| Model / Stack | Recommendation | Notes |
|---|---|---|
| Newly released GPU generation | Move to a later container image | The kernel needs the architecture compiled in; no flag substitutes. |
| Smaller inference card such as the L4 | Check the bundled kernel's architecture list explicitly | Modest parts are sometimes omitted from data-centre-oriented builds. |
| Framework allows a backend choice | Select an attention provider that covers the device | The rejection comes from one kernel provider, not from attention itself. |
| Qualifying new hardware | Run a one-request serve check, not just a load check | The failure appears after model init reports success. |
With the fix vs without the fix
| Dimension | With the fix | Without the fix |
|---|---|---|
| What decides support | The architecture list compiled into the bundled kernel | Assumed to be the TensorRT-LLM version |
| Direction of the gap | Both newer and smaller devices can be missing | Read as the device being too old |
| Where it fails | After model init, at kernel dispatch | Expected during weight loading |
Real engineering notes
“It is tempting to read unsupported architecture as too old. Both reported cases contradict that: one is a Blackwell workstation card newer than the image, the other a small inference part quietly absent from a build aimed at larger silicon. The useful question is not whether the device is modern but whether this particular kernel build enumerates it, and the answer changes between release candidates of the same version.”
Visual fingerprint
bundled FlashInfer FMHA build
compiled for: SM90 SM100 <- enumerated at build time
|
target device SM120 --> not in the list --> Unsupported architecture
target device SM89 --> not in the list --> Unsupported architecture
target device SM90 --> dispatch succeedsRelated failures to investigate next
Root cause, fix & prevention
Frequently asked questions
Twelve targeted questions that engineers and on-call staff most commonly ask about this failure.
My GPU is brand new. How can it be unsupported?
Is there a flag to force it?
Why did the model load successfully first?
Does this mean TensorRT-LLM does not support my card?
Don't just read the fix, diagnose your run
The encyclopedia tells you what went wrong. Denpex tells you what went wrong in YOUR training run. With your logs, your config, and your stack.