Skip to content

Prototype: TensorRT execution provider (linux, CUDA 13.0) - #1

Draft
diegoferigo-rai wants to merge 7 commits into
hmaarrfk:rattler-build-171from
diegoferigo-rai:diegoferigo/tensorrt-support
Draft

diegoferigo-rai wants to merge 7 commits into
hmaarrfk:rattler-build-171from
diegoferigo-rai:diegoferigo/tensorrt-support

Conversation

@diegoferigo-rai

@diegoferigo-rai diegoferigo-rai commented Aug 12, 2026 •

Copy link
Copy Markdown

Draft / prototype — not meant to be merged. TensorRT packages come from a local channel, so CI here cannot build it. Scoped to linux; posted as a starting point to adapt. Relates to conda-forge#199.

Approach

Optional TensorRT execution provider on the CUDA 13.0 linux builds
(linux-64 and linux-aarch64), following the pytorch-feedstock style of
encoding the accelerator in the build string. A dedicated tensorrt variant
axis (linux) gates it; the _tensorrt marker only appears on the TRT build:

Variant Build string
CUDA 13.0 + TRT cuda130_tensorrt_py310_h…_200
CUDA 13.0 (no TRT) cuda130_py310_h…_200
CUDA 12.9 cuda129_py310_h…_200
CPU cpu_py310_h…_0

The inert tensorrt: true combinations (CPU / CUDA 12.9) are skipped, so no
duplicate packages. The CI matrix is restricted to linux for the prototype.

Changes

  • recipe/recipe.yaml: tensorrt_enabled context gated to CUDA 13.0 via the
    tensorrt axis; _tensorrt appended to the build string only on the TRT build;
    TensorRT host deps libnvinfer-devel + libnvonnxparser-devel under
    if: tensorrt_enabled (run_exports pin the runtime libs); package_contents
    lib check for onnxruntime_providers_tensorrt; skip not linux.
  • recipe/build-cpp.nu: cmake flags onnxruntime_USE_TENSORRT=ON,
    onnxruntime_USE_TENSORRT_BUILTIN_PARSER=ON, onnxruntime_TENSORRT_HOME=$PREFIX.
    Builtin parser -> shared libnvonnxparser, nothing static.
  • recipe/conda_build_config.yaml: tensorrt axis (linux) + local
    channel_sources for the locally-built TensorRT packages.

To adapt

  • Replace the local channel_sources
    (file:///…/staged-recipes/build_artifacts,conda-forge) with the real TensorRT
    packages once they land on conda-forge.
  • The local channel only ships linux-64 artifacts; the CUDA 13.0
    linux-aarch64 TRT build won't solve until aarch64 packages are built.
  • Restore the non-linux platforms and decide how far to extend TensorRT.
  • Confirm the builtin (dynamic libnvonnxparser) vs. static parser choice.

diegoferigo-rai and others added 7 commits August 12, 2026 14:39
Wire up an optional TensorRT execution provider for the CUDA 13.0 linux
builds (linux-64 and linux-aarch64), following the pytorch-feedstock style
of encoding the accelerator in the build string.

- recipe.yaml: `tensorrt` variant axis gated to CUDA 13.0; `_tensorrt`
  appended to the build string only on the TRT build; TensorRT host deps
  (libnvinfer-devel, libnvonnxparser-devel) and a provider-lib package test.
- build-cpp.nu: enable onnxruntime_USE_TENSORRT and the builtin ONNX parser
  (dynamic libnvonnxparser, nothing static), TENSORRT_HOME=$PREFIX.
- conda_build_config.yaml: `tensorrt` axis (linux) + local channel_sources
  for the locally-built TensorRT packages.

Prototype only: TensorRT packages come from a local channel and CUDA 13.0
aarch64 artifacts are not built yet.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Regenerated .ci_support, pixi.toml and CI workflow for the TensorRT axis.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Skip non-linux platforms so the prototype only builds linux-64 and
linux-aarch64, where the TensorRT execution provider is enabled.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Regenerated CI configs after restricting the matrix to linux.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move the onnxruntime_providers_tensorrt.so check from an explicit `files`
path to a `lib` entry, letting rattler-build expand it to the
platform-specific library filename.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
conda-forge now ships the TensorRT packages (libnvinfer / libnvonnxparser
and their -devel/-headers) with CUDA 13.0 builds for linux-64 and
linux-aarch64, so the local channel_sources override is no longer needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant