# Make Long-Running NVIDIA TensorRT Engine Builds Observable and Cancelable in Python or C++

DevFeed: [Make Long-Running NVIDIA TensorRT Engine Builds Observable and Cancelable in Python or C++](<https://devfeed.tech/articles/make-long-running-nvidia-tensorrt-engine-builds-observable-and-cancelable-in-python-or-c-6877.md>)

Original publisher: [Read original article](<https://developer.nvidia.com/blog/make-long-running-nvidia-tensorrt-engine-builds-observable-and-cancelable-in-python-or-c/>)

Author: Michelle Horton

Published: 2026-07-22T16:35:04Z

Content type: tutorial

Language: en

Sources: [NVIDIA Developer](<https://devfeed.tech/sources/nvidia-developer.md>), [NVIDIA Technical Blog](<https://devfeed.tech/sources/nvidia-technical-blog.md>)

Topics: [TensorRT](<https://devfeed.tech/topics/tensorrt.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Python](<https://devfeed.tech/topics/python.md>), [GPU](<https://devfeed.tech/topics/gpu.md>), [Cache](<https://devfeed.tech/topics/cache.md>)

Tags: [agentic-ai-generative-ai](<https://devfeed.tech/tags/agentic-ai-generative-ai.md>), [build-ai-agents](<https://devfeed.tech/tags/build-ai-agents.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [cache](<https://devfeed.tech/tags/cache.md>), [code](<https://devfeed.tech/tags/code.md>), [developer-tools-techniques](<https://devfeed.tech/tags/developer-tools-techniques.md>), [developers](<https://devfeed.tech/tags/developers.md>), [featured](<https://devfeed.tech/tags/featured.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [python](<https://devfeed.tech/tags/python.md>), [tensorrt](<https://devfeed.tech/tags/tensorrt.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

## AI overview

This tutorial explains how to make long-running NVIDIA TensorRT engine builds observable and cancelable in Python and C++. It presents a thread-safe progress monitor with nested build phases, shows how to connect it to the TensorRT builder, and demonstrates cancellation through Ctrl-C or a programmatic stop signal. Progress can be routed to a terminal, IDE, service, or agent runtime.

## Source excerpt

A TensorRT engine build can take seconds to many minutes. Large strongly typed models, deep tactic search, and a cold timing cache on a brand-new GPU SKU can...