Commit 9c1e299
committed
fix: build against TensorRT older than 10.15
Building Torch-TensorRT against TensorRT 10.13 or older fails to compile:
core/runtime/TRTEngine.cpp:298: error: 'class nvinfer1::ICudaEngine'
has no member named 'getAliasedInputTensor'
That API was added in TensorRT 10.15, together with the IKVCacheUpdateLayer
that produces the aliasing it reports. The runtime calls it unconditionally,
while the package declares a bare tensorrt dependency with no minimum version,
so an older TensorRT produces a compile error rather than a clear message.
The call is only used to reconcile the build-time aliased I/O map against what
the engine reports. On older TensorRT there is nothing to reconcile against, so
the build-time map stands on its own and the reconciliation is skipped.
Guard it with a named feature macro, following the existing TRT_HAS_NATIVE_NCCL
convention in the same header.1 parent 3141ff3 commit 9c1e299
2 files changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
| 295 | + | |
295 | 296 | | |
296 | 297 | | |
297 | 298 | | |
| |||
315 | 316 | | |
316 | 317 | | |
317 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
318 | 323 | | |
319 | 324 | | |
320 | 325 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
30 | 36 | | |
31 | 37 | | |
32 | 38 | | |
| |||
0 commit comments