ReadingResearchRadarInvestment framework
Sign in / Sign up
← Back to reading
NewsMaterial3 min readDisconfirmAI Editorial

NVIDIA DIN Deploy: ONNX Runtime Session APIs Let C++ AI Apps Swap Accelerators Without Rewriting Application Code

NVIDIA developer technology engineers Luca Spindler and Maximilian Müller describe DIN Deploy, an open-source C++ sample repository that separates model export from deployment by building the application layer against ONNX Runtime's session and tensor APIs while keeping CUDA and TensorRT-specific code in optional accelerated paths. The FLUX.2 sample extends this to graphics interop with Vulkan and DirectX, and demonstrates post-training quantization as a drop-in ONNX replacement requiring no application-code changes.

2026-10-01

The hardest part of shipping a local AI model in a native application is not the inference itself — it is the coupling between model format, runtime, and hardware. NVIDIA's Do Inference Now (DIN) Deploy repository, described by developer technology engineers Luca Spindler and Maximilian Müller in an October 2026 blog post, offers a concrete answer: build the application against ONNX Runtime's session and tensor APIs, keep vendor-specific code (CUDA kernels, TensorRT engine builders) in optional accelerated paths, and let the execution provider handle the hardware translation. The result is a C++ codebase that runs the same inference logic whether the underlying accelerator is an RTX GPU, a CPU, or another execution provider that supports the required ONNX Runtime tensor APIs.

Each sample follows a two-stage pipeline. A Python exporter downloads a model checkpoint from Hugging Face and converts it into an ONNX artifact. The application side is a native C++ CLI built on ONNX Runtime. That split keeps model conversion separate from deployment logic, and developers can take an exported model into a local application without requiring a model-specific runtime. Most sample code uses ONNX Runtime session and tensor APIs; vendor-specific code, including CUDA APIs and kernels, appears only in optional accelerated paths. The repository provides CMake presets for Windows, Linux, x86-64, and Arm64, and CMake downloads ONNX Runtime and TensorRT RTX by default.

Sign in / Sign up
ReadingResearchRadarInvestment framework

The FLUX.2-klein-4B image generation sample extends this pattern into graphics territory. It uses ONNX Runtime's graphics interop capability, introduced in version 1.25, with Vulkan and DirectX for sampling. This allows applications to integrate GPU-resident resources with a cross-vendor shader interface, avoiding the CPU round-trip that would otherwise be needed to move intermediate tensors between the inference engine and a rendering pipeline. The sample also demonstrates post-training quantization with NVIDIA Model Optimizer: the quantized model is a drop-in ONNX replacement requiring no application-code changes, because the ONNX interfaces remain unchanged even though the underlying computation is hardware-dependent.

The repository covers several task families. For automatic speech recognition, it supports offline transcription with OpenAI Whisper and streaming pipelines with NVIDIA Parakeet TDT and NVIDIA Nemotron ASR Streaming. Meta SAM 2.1 samples provide interactive segmentation masks for images and video. Performance measurements on DGX Spark, reported by the authors, show GPU acceleration ranging from 39x real-time for Nemotron ASR streaming to 206x for Parakeet TDT, while SAM 2.1 achieves 38.3 FPS on GPU versus 0.5 FPS on CPU. These are first-party benchmarks on NVIDIA hardware, not independently reproduced results.

The transferable insight is architectural rather than performance-specific. If a developer structures their C++ inference code around ONNX Runtime's session and tensor APIs, the execution provider becomes a configuration choice rather than a code dependency. This means the same application binary can target different accelerators by swapping the provider, and quantization or format changes do not require rewriting the application layer. The limitation is that the accelerated paths still require the specific hardware and driver stack — the portability is in the interface, not in the performance. A developer who needs the 206x speedup is still an NVIDIA GPU developer; the pattern simply means they do not have to rewrite their application code when the model changes.

Sources

  • developer.nvidia.comNVIDIA Technical Blog↗
Continue researching →