Home / Blog / GPU Repair

TensorRT Engine Won't Load or Gives Wrong Results? Engine Version, Compute Capability & Precision Diagnosis Guide

GPU Repair 2026-11-26 26 minutes HK GPU Fix Editorial Team
TensorRT Engine Won't Load or Gives Wrong Results? Engine Version, Compute Capability & Precision Diagnosis Guide

Summary

A TensorRT engine that will not load or gives wrong results usually fails at the engine version, the compute capability it was built for, or the precision it was compiled with. Three one-variable tests — rebuild the engine, build on the target card, then step precision from FP32 to FP16 to INT8 — separate the three layers.

What "TensorRT engine won't load or gives wrong results" actually means

Start by defining the symptom precisely, because two different failures are described with the same words, and they point in different directions. The symptom this guide covers is a problem that appears on a Windows computer with an NVIDIA graphics card, when a model compiled with TensorRT either refuses to load or loads but produces wrong inference results. The visible forms are: loading the engine file reports an error and the engine never runs; or the engine runs, but its outputs are wrong — wrong classifications, wrong detections, or numbers that do not match the same model run in its original framework.

Before any test is run, the first split must be made, because the two failure appearances are different directions and must never be lumped together:

  • The engine will not load. The loader reports a compatibility error, and the engine never runs. The official NVIDIA documentation names two such errors: "The engine plan file is not compatible with this version of TensorRT, expecting (format|library) version <X> got <Y>; please rebuild." and "The engine plan file is generated on an incompatible device, expecting compute <X> to get compute <Y>; please rebuild." Both sentences end with the same instruction: rebuild. Neither one asks for a setting to be changed.
  • The engine loads but gives wrong results. The engine runs to completion, but its outputs do not match the original model. This is a precision or input problem, not a loading problem, and it needs a different test.

That is not the same as these lookalikes, and they should be separated before any testing begins:

  • Choosing between TensorRT, ncnn and Vulkan as a backend for video frame interpolation. That is a player backend choice, covered by the guide on SVP RIFE backend selection. TensorRT there is only a backend option name, not a TensorRT engine diagnosis.
  • Topaz Video AI failing to render, or a model failing to download. That is a Topaz application layer problem — its AI processor setting, its memory limit, or its download being blocked. The guide on Topaz Video AI contains no TensorRT diagnosis.
  • PyTorch training or inference throwing a CUDA out-of-memory error. That is an allocator fragmentation problem, covered by the guide on PyTorch CUDA out-of-memory errors. It is not an engine-file problem.
  • A LoRA training run throwing a CUDA out-of-memory error halfway through. That is a training memory-pool problem, covered by the guide on LoRA training running out of memory.
  • faster-whisper running on the CPU, or a transcription missing passages. That is a faster-whisper device and compute-type problem, covered by its own guides. Its precision setting is a faster-whisper setting, not a TensorRT engine precision.
  • Ollama failing to load a model. That is an Ollama layer problem, covered by the Ollama model-loading guides.
  • The engine taking a long time to build. That is not a fault. Building an engine for a large model can take a long time, especially at a high optimisation level, and waiting a long time does not mean the build has hung.

If the symptom is one of those lookalikes, the tests below will still teach how TensorRT engines work, but their conclusions will not fit neatly. If the symptom is that a TensorRT engine file refuses to load with a compatibility error, or loads but gives wrong results, work through the three tests in order. The order matters: the first test decides whether the engine file matches the TensorRT version, the second decides whether it matches the graphics card it runs on, and the third decides whether the precision it was compiled with is the cause. Changing the version, the card and the precision all at once before the first test is done destroys the most valuable diagnostic evidence available — the difference between a setup that was already wrong and a setup that one changed setting broke.

How TensorRT engines work, and where they can break

TensorRT is NVIDIA's inference compiler. It takes a trained model, exported through ONNX, and recompiles it into an engine plan file — a file with the .engine extension — optimised for one particular graphics card. It optimises in three ways: layer fusion, which merges consecutive operations into a single kernel; precision calibration, which runs in FP16 or INT8 instead of FP32; and kernel auto-tuning, which picks the fastest implementation for that particular card.

An engine file is not a portable file. By default it cannot be used across TensorRT versions, and it cannot be used across compute capabilities. Compute capability is the number that identifies a graphics card's architecture generation, and the engine is compiled against it. The official NVIDIA documentation lists the two compatibility errors quoted above, and both end with the same instruction: rebuild the engine. An engine file should therefore always be built on the target card, with the TensorRT version that will run it. An engine file downloaded from the internet and used on a different card is not a supported route, and this guide does not teach it.

Precision is a trade-off, not a free upgrade. FP32 is the reference standard: it is the baseline that results are compared against. FP16 is the production default: it generally runs faster than FP32 with a negligible loss of accuracy, but the exact gain depends on the model and the graphics card, and it must not be quoted as a single universal number. INT8 is faster still, but it has a measurable loss of accuracy, and it needs a calibration table built from representative data. A calibration table is not guaranteed to work across TensorRT versions, so changing version means doing the calibration again.

There is one hidden variable that must be kept straight through every test that follows. On Ampere-generation cards and newer, TF32 is switched on by default. TF32 changes FP32 arithmetic, so a comparison against a true FP32 reference is not bit-exact unless TF32 is switched off first. The Torch-TensorRT documentation states this plainly: for a bit-exact FP32 comparison, TF32 must be off. An engine built on Windows can also show small floating-point differences from the same engine built elsewhere, because of driver differences, and that difference alone is not proof that the engine is wrong.

Before the three tests: three preconditions

These are preconditions, not tests. They are checked before any of the three tests is run, and they decide whether the three tests apply at all.

Precondition one: the same model, the same machine, the same TensorRT version. Every test below compares two states that differ in exactly one variable. That comparison is only valid if the model, the machine and the TensorRT version are the same in both states. Changing the model or the version between the two states destroys the comparison.

Precondition two: note down the build history. Before testing, record which TensorRT version the engine was built with, and which graphics card it was built on. An engine file carries no label that a user can read at a glance, so without that note there is no way to say whether the version or the card is the mismatch.

Precondition three: the engine must be built, not downloaded. Engine files should be built on the target card from the model, through the official build tools. An engine file downloaded from the internet and used on a different card is not a supported route, and the tests below assume the engine was built locally.

Test 1: Compare the old engine file against a freshly rebuilt one

Test 1 is the gate. It is done before touching the graphics card or the precision, because it separates "the engine file does not match the TensorRT version" from "the version is not the variable".

Use the same model, the same machine and the same TensorRT version, and compare two states: loading the existing .engine file, and deleting that file, rebuilding a new engine from the model, and loading the new one. Do not change anything else between the two states: not the card, not the precision, not the model. One variable changes: whether the engine file was built with the current TensorRT version.

ResultWhat it meansWhere to go next
The old file reports "not compatible with this version of TensorRT… please rebuild", and the rebuilt engine loads normallyThe engine version layer: the fault follows the engine file's version. The old file was built with a different TensorRT version.The diagnosis is complete at this layer. Keep the rebuilt engine; Test 2 will confirm the card match.
The rebuilt engine still will not loadThe fault is not in the version layer.Go to Test 2 and look at the compute capability and the card.
The engine loads after rebuilding, but the results are still wrongThe fault is not a loading fault at all. The version layer is cleared.Go to Test 3 and look at the precision.

The calibration table follows the same rule, and it must not be forgotten. An INT8 calibration table cannot be used across TensorRT versions, so when the version changes, the calibration has to be done again. An old calibration table carried into a new version is not a valid calibration, and it cannot be treated as one.

To be clear about the resemblance: the shape of this version comparison resembles the version comparison in the guide on WSL not finding the graphics card, where the WSL version, the Windows driver and the toolkit version are compared. The shapes are similar, but the variables are different. That guide asks which of three system versions is the variable, and its result variable is whether nvidia-smi finds the card. This test asks whether the TensorRT engine file matches the TensorRT version, and its result variable is whether the engine loads or reports an error. Similar shape, different variable, and the conclusion of the WSL guide cannot be carried across and used here.

Test 2: Compare which card built the engine against which card runs it

Test 2 changes one variable at a time inside the device layer, and only after Test 1 has proved that the version is not the fault. It asks whether the engine was built for the card it runs on. Use the same model and the same TensorRT version, and compare two states: building the engine on the target card itself and running it there, against building the engine on a different card and bringing it to the target card to run.

ResultWhat it meansWhere to go next
Running the cross-built engine reports "generated on an incompatible device, expecting compute <X> to get compute <Y>; please rebuild", and rebuilding on the target card worksThe device layer: the fault follows the card the engine was built on. The engine is bound to the compute capability it was built for.The diagnosis is complete at this layer. Always build on the target card.
The engine loads on both cards, but the results differ slightlyA warning, not a hard error. Cards with the same compute capability but different models are only warned against by the official documentation, not blocked.The official guidance is not to use an engine across card models, because performance can suffer and errors can appear. Rebuild on the target card regardless.
The engine still will not load after rebuilding on the target cardThe fault is not in the device layer.Go back to Test 1, or go to Test 3 and look at the precision.

Two distinctions inside this test must be kept straight. First, a warning is not a hard error: when two cards share the same compute capability but are different models, the official documentation only warns against using an engine across them — it does not report a hard error. That warning must not be written as if the engine will certainly fail. Second, Torch-TensorRT has the same fork in a different form: when loading reports "Engine failed to deserialize", there are two possible causes, and they must be separated. If the TensorRT version on the loading machine is older than the one the engine was built with, the answer is to upgrade TensorRT, or to rebuild with the version-compatible option. If the graphics card's compute capability is lower than the machine the engine was built on, the answer is to rebuild with the hardware-compatible option, which is only available on Ampere-generation cards and newer. The two causes have different repairs, and they must never be lumped together.

To be clear about the resemblance: the shape of this device comparison resembles the device comparison in the guide on Ollama running on the CPU, where the graphics card is compared against the CPU. The shapes are similar, but the variables are different. That guide asks which device the model runs on at run time. This test asks which card the engine file was built for. One is a run-time device choice, the other is a build-time binding, and the conclusion of the Ollama guide cannot be carried across and used here.

Test 3: Compare precision FP32 against FP16 against INT8, one step at a time

Test 3 changes one variable at a time inside the precision layer, and only after Tests 1 and 2 have proved that the version and the card are not the fault. It asks whether the precision the engine was compiled with is the cause of the wrong results. Use the same model, the same card and the same TensorRT version, and step the precision down one level at a time: FP32 first, then FP16, then INT8. At each level, record whether the results are right and how fast it runs. Do not jump straight from FP32 to INT8, because the change at the FP16 step is itself evidence.

ResultWhat it meansWhere to go next
FP32 gives the right results, and FP16 or INT8 gives wrong resultsThe precision layer: the fault follows the precision. The lower precision does not have enough dynamic range for this model; the model itself is not broken.The diagnosis is complete at this layer. Keep the precision that gives the right results, or recalibrate INT8 with deployment data.
FP32 also gives wrong resultsThe fault is not in the precision layer.Go back to Tests 1 and 2, or check the input preprocessing — the official documentation states that a wrong input preprocessing format can also make results wrong.
INT8 gives wrong results even after recalibrationThe INT8 calibration may be wrong, or this model may not suit INT8 at all.Check the calibration data, and test FP16 as the production precision instead.

Inside this test sit two sub-checks, and they belong inside this test. They must not be split off as separate tests, because they answer the same question from two sides: is the precision comparison itself valid?

Sub-check one: TF32. On Ampere-generation cards and newer, TF32 is switched on by default. Switch it off before doing the FP32 comparison, or the comparison against a true FP32 reference is not bit-exact. A difference that disappears when TF32 is switched off was a TF32 difference, not a model difference.

Sub-check two: the INT8 calibration data. INT8 needs calibration before it can be used, and the calibration table cannot be used across TensorRT versions. The accuracy loss has to be verified with the deployment's own data; public sample data cannot stand in for it, because the sample data does not represent the deployment's inputs.

To be clear about the resemblance: the shape of this precision comparison resembles the precision comparison in the guide on ComfyUI producing all-black images, where a precision flag is switched, and the precision comparison in the guide on faster-whisper missing passages, where the compute type is changed. The shapes are similar, but the variables are different. Those guides ask about ComfyUI VAE decoding precision and faster-whisper compute-type precision. This test asks about TensorRT engine precision, and its result variable is whether the TensorRT inference results are right. Neither of those guides mentions TensorRT at all, and their precision conclusions cannot be carried across and used here.

How the three tests fit together

TestWhat it provesIf it fails, the fault is in
Test 1: Old engine file against a freshly rebuilt oneWhether the engine file matches the TensorRT versionThe engine version, or — if rebuilding does not help — the device or precision layer
Test 2: Built on the target card against built on another cardWhether the engine matches the card it runs onThe compute capability and device binding, or — if rebuilding on the target card does not help — the version or precision layer
Test 3: Precision FP32 against FP16 against INT8, one step at a timeWhether the compiled precision is the cause of wrong resultsThe precision and dynamic range, or — if FP32 is also wrong — the input preprocessing or the version and device layers

Reading the table from top to bottom is the whole method: prove the version, prove the card, then prove the precision. A fault that survives all three tests with every layer apparently correct has not been proved unfixable — it has been proved to need a different investigation, starting with what changed most recently: a TensorRT update, a driver update, a different graphics card, or a different model export.

Common misconceptions

"An engine file works on any graphics card." No. An engine file is bound to the compute capability it was built for and to the TensorRT version it was built with. Using it across cards or across versions is not a setting to change; the official documentation tells you to rebuild it.

"INT8 is always faster and costs nothing." No. INT8 needs a calibration table, and it has a measurable loss of accuracy. The accuracy loss has to be verified with the deployment's own data, and public sample data cannot stand in for it.

"Higher precision is always better." No. FP16 is the production default, and FP32 is only the reference standard. Using FP32 blindly only makes the engine slower; it does not make the results more right.

"A calibration table done once works forever." No. A calibration table is not guaranteed to work across TensorRT versions. Changing version means doing the calibration again.

"An engine that will not load means the model is broken." No. Separate the version layer with Test 1 and the device layer with Test 2 first. Most of the time the engine file does not match the version or the card; the model itself is not broken.

"An engine build that takes a long time has hung." No. Building an engine for a large model can take a long time, especially at a high optimisation level. Waiting a long time is not a fault, and stopping the build halfway and then blaming the engine is a mistake.

Boundaries: what this guide does not cover

SituationWhich guide to followWhy it is not this guide
Choosing between TensorRT, ncnn and Vulkan as a frame-interpolation backendThe guide on SVP RIFE backend selectionA player interpolation backend choice, not a TensorRT engine diagnosis
Topaz Video AI failing to render, or a model failing to downloadThe guide on Topaz Video AIA Topaz application layer — AI processor, memory limit, download blocking — with no TensorRT in it
PyTorch training or inference throwing a CUDA out-of-memory errorThe guide on PyTorch CUDA out-of-memory errorsAn allocator fragmentation layer, not an engine-file layer
A LoRA training run throwing a CUDA out-of-memory error halfway throughThe guide on LoRA training running out of memoryA training memory-pool layer
faster-whisper running on the CPU, or a transcription missing passagesThe faster-whisper device and precision guidesEach tool's own device and compute-type layer
Ollama failing to load a modelThe Ollama model-loading guidesAn Ollama layer
The engine running out of memory while being builtThe out-of-memory family of guidesA build-time sub-check, not one of the three tests
Jetson or DLA deploymentOut of scopeThis guide covers desktop graphics cards only; Jetson DLA and JetPack version problems are a different layer

The build-time sub-checks — running out of memory while building the engine, a shape mismatch between the compiled shape and the input shape, a "could not find any implementation for node" error, and a long build time — are checks inside the build layer, not tests in this guide. A shape mismatch means the model was compiled with a fixed shape but receives a different shape at run time; it is fixed by recompiling with minimum, optimal and maximum shapes so that dynamic shapes are supported. A "could not find any implementation" error means the workspace is too small, and the workspace limit has to be raised. Neither one is a fourth test, and they must not be written as one. No download or installation steps for TensorRT, models, engine files or calibration tables are given here. Version figures, including TensorRT version numbers, should be checked against the current official documentation at the time of reading, because they change.

Prevention and ongoing care

A setup that works today can stop working after an update, because the chain depends on the TensorRT version, the graphics card, the model export and the precision settings all agreeing with each other. A few habits keep the chain visible so that the next failure is quick to divide:

  • Keep a short note of the working configuration: which TensorRT version the engine was built with, which graphics card it was built on, and which precision it was compiled with. When something changes, the note tells you what changed.
  • Always build the engine on the target card, with the TensorRT version that will run it. Never carry an engine file across cards or across versions.
  • When the TensorRT version changes, rebuild the engine and redo the INT8 calibration. Do not carry an old engine file or an old calibration table into a new version.
  • Verify accuracy with the deployment's own data after any precision change. A faster precision that gives wrong results on the deployment's inputs is not a faster engine.
  • Treat version figures as snapshots, not permanent answers. The TensorRT version numbers in any guide are the authority at the time of writing, and the current official documentation should be checked before treating any figure as the answer.
  • When a new model is compiled for the first time, run the three tests on a short inference before deploying it. A short test that is wrong costs minutes to diagnose; a deployed engine that is wrong costs the whole deployment.

When to seek professional help

If Tests 1 to 3 have been run in order and the results point to a layer that cannot be changed safely — for example, the engine still will not load after rebuilding on the target card with the current TensorRT version, or the traceback names a dependency problem that cannot be resolved by updating or replacing the package — that is the point to bring the machine in rather than keep changing settings. The same applies if the problem appears alongside other symptoms, such as the graphics card not being detected at all, the machine overheating, or a display failing, which suggest a problem beyond the engine file.

Diagnosis and repair are charged under the site's public three-tier pricing, from HK$400 to HK$2,800 depending on the work involved, with the actual price subject to quote after inspection. The shop is at Room 1209, Dali Plaza, Shek Mun. The phone number is 2186 8010 and WhatsApp is 6558 6806. There is no Mong Kok shop and no on-site service, so please bring the machine to the Shek Mun shop, and bring the notes from your three tests — whether the fault followed the rebuild, which card the engine was built on, and which precision gave the right results — because those notes are the fastest route to the right repair.

Frequently asked questions

Is an engine file universal — can it be used on any graphics card?

No. An engine file is bound to the compute capability it was built for and to the TensorRT version it was built with, and by default it cannot be used across versions or across compute capabilities. Using it across cards or across versions is not a setting to change; the official documentation tells you to rebuild it, on the target card, with the TensorRT version that will run it. Even cards with the same compute capability but different models are only warned against by the official documentation, not recommended for sharing an engine.

My TensorRT engine will not load after a TensorRT update — what happened?

The engine file was built with the old TensorRT version, and engine files cannot be used across versions by default. The loader reports "not compatible with this version of TensorRT… please rebuild", and the fix is to rebuild the engine with the current version. That is Test 1: delete the old .engine file, rebuild from the model, and load the new one. If the rebuilt engine still will not load, the fault is not in the version layer, and Test 2 is next.

What does "Engine failed to deserialize" mean in Torch-TensorRT?

It has two possible causes, and they must be separated. If the TensorRT version on the loading machine is older than the one the engine was built with, upgrade TensorRT, or rebuild with the version-compatible option. If the graphics card's compute capability is lower than the machine the engine was built on, rebuild with the hardware-compatible option, which is only available on Ampere-generation cards and newer. The two causes have different repairs, and they must never be lumped together.

FP32 gives the right results but FP16 gives wrong results — is the model broken?

No. That proves the precision layer: the lower precision does not have enough dynamic range for this model, and the model itself is not broken. FP16 is the production default, but it is not right for every model. Keep the precision that gives the right results, or recalibrate INT8 with deployment data. That is Test 3. Do not jump straight from FP32 to INT8, because the change at the FP16 step is itself evidence.

FP32 also gives wrong results — what should I check next?

The fault is not in the precision layer. Go back to Tests 1 and 2 to check the version and the card, and then check the input preprocessing: the official documentation states that a wrong input preprocessing format can also make results wrong. A model that is wrong at FP32 has a problem before precision is involved.

Why does INT8 need a calibration table, and do I need to redo it after a TensorRT update?

INT8 needs calibration before it can be used: the calibration table records how values are mapped into the INT8 range. A calibration table is not guaranteed to work across TensorRT versions, so changing version means doing the calibration again. The accuracy loss has to be verified with the deployment's own data; public sample data cannot stand in for it, because the sample data does not represent the deployment's inputs.

Why does the official guidance say to switch TF32 off for FP32 comparisons?

Because on Ampere-generation cards and newer, TF32 is switched on by default, and it changes FP32 arithmetic. A comparison against a true FP32 reference is not bit-exact unless TF32 is switched off first. A difference that disappears when TF32 is switched off was a TF32 difference, not a model difference. TF32 is a sub-check inside Test 3, not a separate test.

My model was compiled with a fixed shape but receives a different shape at run time — what should I do?

That is a shape mismatch, a build-setting check, not a separate test. Recompile with minimum, optimal and maximum shapes so that dynamic shapes are supported. A shape mismatch does not mean the model is broken; it means the compilation did not allow for dynamic shapes, and recompiling fixes it.

My engine build runs out of memory — what should I do?

That is a build-time out-of-memory error, a sub-check in the out-of-memory family, not one of the three tests. The official documentation states that when compilation runs out of memory, the model can be offloaded to the CPU and compiled there. Build-time out-of-memory and run-time out-of-memory are two different layers and must not be lumped together, and neither one is a fourth test. Separately, a long build time is not a hang: building an engine for a large model can take a long time, especially at a high optimisation level, and the build should not be stopped halfway and then blamed.

Can I download a ready-made .engine file from the internet and use it?

No. An engine file is bound to the TensorRT version and the compute capability it was built for, so a downloaded engine is very unlikely to match the machine it runs on. Engine files should be built on the target card from the model, through the official build tools. This guide does not teach downloading engine files from non-official sources.

Related Articles

Related Services

Looking for Chip-level GPU repair? Explore our service guides: