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.
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.