Build the full accelerated JetPack 7.2 inference server#2651
Open
alexnorell wants to merge 110 commits into
mvp/new-inference-pipelineroboflow/inference:mvp/new-inference-pipelinefrom
agent/fix-jetson-nvjpeg-runtimeroboflow/inference:agent/fix-jetson-nvjpeg-runtimeCopy head branch name to clipboard
Open
Build the full accelerated JetPack 7.2 inference server#2651alexnorell wants to merge 110 commits intomvp/new-inference-pipelineroboflow/inference:mvp/new-inference-pipelinefrom agent/fix-jetson-nvjpeg-runtimeroboflow/inference:agent/fix-jetson-nvjpeg-runtimeCopy head branch name to clipboard
alexnorell wants to merge 110 commits into
mvp/new-inference-pipelineroboflow/inference:mvp/new-inference-pipelinefrom
agent/fix-jetson-nvjpeg-runtimeroboflow/inference:agent/fix-jetson-nvjpeg-runtimeCopy head branch name to clipboard
Conversation
Native bridges: bind the CUDA context on the retrieve thread (Jetson), synchronize consumer streams in the dGPU DLPack deleter, reset failed pipelines to NULL before unref, null teardown pointers, snapshot dlerror, fold the DLPack plane offset, and return a distinct grab timeout status (ABI v3). Python side: serialize bridge interrupt/close, guard the DLPack capsule against double-free, bound discovery and steady-state grabs so stalled sources recover instead of deadlocking the state lock, log hardware producer construction failures, move decoder re-ranking out of probes, and materialise tensor frames in a single copy (grayscale as 3-channel). Docker/CI: gate Jetson-only checks in verify_media_runtime.sh so GPU and JP6.2 builds pass, restore python3 in the GPU runtime, add missing TARGETARCH args, derive CUDA sonames from the image version, and skip T4 verify steps on targeted dispatches. Verify runtimes gain a threaded retrieve check mirroring production threading.
The server image moves to JetPack 7.2 (L4T r39.2, CUDA 13.2) and bakes the Jetson tensor bridge for sm110, superseding both the 7.1 image and the standalone JP7.2 image PR (#2531). Ported from #2531: the flash-attn build from a pinned commit with FLASH_ATTN_CUDA_ARCHS=110 (PyPI 2.8.3 ships no sm_110 kernels and fails at runtime on Thor), the ORT 1.24.2 CUDA 13.2 CCCL pin rationale, cu132 build-cache ids, and build parallelism args. The media workflow moves to docker.media.jetson.7.2.0.yml and the old 7.1 workflow becomes the 7.2 server workflow. The CLI now resolves L4T r39 (previously unmatched, falling through to the amd64 GPU image) and r38 to the 7.2 image.
… experiment/native-jetson-decoder # Conflicts: # .github/workflows/docker.jetson.7.2.0.yml # .github/workflows/test.nvidia_t4.yml # docker/dockerfiles/Dockerfile.media.jetson.7.2.0 # docker/dockerfiles/Dockerfile.onnx.gpu # docker/dockerfiles/Dockerfile.onnx.jetson.7.1.0 # docker/native/gstreamer_cuda_tensor_bridge/gstreamer_cuda_tensor_bridge.cpp # docker/native/jetson_tensor_bridge/jetson_tensor_bridge.cu # docker/scripts/verify_gstreamer_cuda_tensor_runtime.py # docker/scripts/verify_jetson_tensor_runtime.py # docker/scripts/verify_media_runtime.sh # inference/core/interfaces/camera/discoverability.py # inference/core/interfaces/camera/gstreamer_cuda_producer.py # inference/core/interfaces/camera/gstreamer_cuda_tensor_bridge.py # inference/core/interfaces/camera/jetson_producer.py # inference/core/interfaces/camera/jetson_tensor_bridge.py # inference/core/interfaces/stream/inference_pipeline.py # requirements/requirements.gpu.txt # tests/inference/unit_tests/core/interfaces/camera/test_discoverability.py # tests/inference/unit_tests/core/interfaces/camera/test_gstreamer_cuda_producer.py # tests/inference/unit_tests/core/interfaces/camera/test_jetson_producer.py # tests/inference/unit_tests/core/interfaces/camera/test_video_source.py # tests/inference/unit_tests/core/interfaces/stream/test_tensor_sink_boundary.py
alexnorell
force-pushed
the
agent/fix-jetson-nvjpeg-runtime
branch
2 times, most recently
from
July 14, 2026 13:02
b452589 to
7ba205f
Compare
This reverts commit a942f44.
alexnorell
force-pushed
the
agent/fix-jetson-nvjpeg-runtime
branch
2 times, most recently
from
July 14, 2026 14:43
6d0361f to
2ce46f8
Compare
alexnorell
changed the base branch from
mvp/new-inference-pipeline
to
experiment/native-jetson-decoder
July 14, 2026 14:43
alexnorell
marked this pull request as ready for review
July 21, 2026 17:50
alexnorell
requested review from
PawelPeczek-Roboflow,
dkosowski87,
grzegorz-roboflow,
hansent,
probicheaux,
rafel-roboflow and
yeldarby
as code owners
July 21, 2026 17:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR turns the JetPack 7.2 image into the full accelerated Inference server and carries the tensor-native Workflow work previously reviewed in #2649.
SM87) and Thor (SM110)InferencePipelineto reuse its existing Workflow executor for the engine lifetimeWhy Superiorvision and Tracktors
The upstream Supervision and Trackers APIs remain the compatibility contract, but their numeric hot paths are NumPy/CPU-oriented. The forks preserve those public interfaces while changing the internal representation and execution model:
sv.Detectionssv.DetectionsThe compatibility aliases are deliberate:
import supervisionresolves to Superiorvision andimport trackersresolves to Tracktors in this image. Runtime verification checks package identity, pinned versions, tensor-backed detections, CUDA execution, and the realCUDABatchExecutor/update_batchpath.Runtime contract
SM87andSM110Persistent Workflow executor fix
The production camera/streaming path created a long-lived executor and exposed it to Workflow blocks, but did not pass it to
ExecutionEngine.init(). The engine consequently created and destroyed worker pools for ready-step groups. CUDA streams are thread-local, so each replacement worker created new streams and left allocator blocks owned by streams that future workers could not reuse.The observed signature was approximately 46–48 MiB of additional CUDA reservation per frame until a 5,284 MiB plateau. On Orin Nano this surfaced as roughly 5.75 GiB of cgroup kernel/NvMap memory, swap pressure, and OOM warnings even though live PyTorch allocations were small. A model-only reproduction showed the same growth, excluding Tracktors state as the cause.
Commit
86e76b04epasses the pipeline-owned executor toExecutionEngine.init()and retains the existing shutdown owner. The regression test verifies that the same executor is supplied to both the engine and Workflow block initialization, remains alive during processing, and is shut down exactly once when the pipeline ends.Allocator proof from the isolated reproduction:
torch.cuda.empty_cache()immediately released the inactive reservationThe HTTP Workflow path already supplied a shared executor; the affected path was
InferencePipeline.init_with_workflow()used by streaming/camera pipelines.Read-only Triton cache fix
Hardware validation found that the server could start under the documented read-only container configuration, but Tracktors' first fused Triton kernel compilation defaulted to
/root/.tritonand failed withOSError: read-only file system. Commit5f9aaf60ddefinesTRITON_CACHE_DIR=/tmp/triton-cachein the JP7.2 runtime and makes the image verifier enforce that contract. The final device matrix used a read-only root filesystem and writable/tmp, injected no cache override, and confirmed that Triton generated the lifecycle, Kalman, and assignment PTX/CUBIN artifacts under the configured path.Corrected Jetson benchmark
The comparison uses the same live RTSPS source, model, and Workflow. The NumPy path receives CPU/NumPy detections and uses the existing tracker implementation. The tensor path begins with data already resident on CUDA and uses Superiorvision + Tracktors, so the intended elimination of transfers and conversions is included rather than hidden.
roboflow/roboflow-inference-server-jetson-7.2.0@sha256:238c3f0a5dc0d409b3949d2cdebcfad864281ca5539d642e9a4f320bc10f372d8026b888d671bed5325d9c993395d5ddc3320ff52b44bd3f5d3d791b24f352feFive-minute model + tracker results
Tensor path change versus NumPy
On Nano, the tensor path processed 6,345 of 6,356 source frames; NumPy processed 4,421 of 6,298 and dropped roughly 30%. GPU utilization per delivered frame improved by approximately 75% on Thor, 21% on AGX Orin, and 35% on Nano. The corrected tensor + tracker runs ended with about 34.3 MiB actively allocated by PyTorch; reservation peaked at 200 MiB and fell to 36 MiB after
empty_cache(). There were no CUDA OOMs, allocator retries, or swap-pressure failures.Validation completed
sm_87andsm_110Benchmark caveats
LazyFreeor CUDA-mapped pages and overstate live memory.Remaining release gates
5f9aaf60d: GitHub Actions run 29846434972roboflow/roboflow-inference-server-jetson-7.2.0:1.4.0-pr2651-torch213-5f9aaf60dasha256:4b4700a5da766e58def0fa933dba10838e927f61050772bfb0403ed3322a10deand ARM64 manifest digestsha256:1248ae8e46fbe63c6f502d6bd41547668353aa41f7654071b6f4568b35994ae8Earlier builds remain useful as Depot cache inputs, but are not release candidates after the executor and read-only cache fixes. The immutable final digest above is the release candidate.