NVIDIA Releases Open-Source DIN Deploy C++ Samples for Local AI Inference

Editorial illustration featuring a metallic gear seamlessly integrating into a glowing crystal prism against a dark background.

NVIDIA has introduced Do Inference Now (DIN) Deploy, an open-source repository of C++ samples designed to help developers build hardware-accelerated local AI applications across Windows and Linux. The repository combines ONNX Runtime with the NVIDIA TensorRT RTX execution provider, allowing native applications to run accelerated model inference while accessing the underlying execution provider via standard ONNX Runtime APIs or WinML 2.0.

Decoupling Export from Native Runtime Logic

DIN Deploy separates model conversion from application code by using a Python script to download model checkpoints from Hugging Face and export them into ONNX artifacts. The application side relies on a native C++ command-line interface built directly on ONNX Runtime session and tensor APIs. Vendor-specific additions, such as CUDA APIs or custom kernels, are isolated within optional execution paths, allowing the core application logic to remain clean and portable across supported hardware.

To keep data locality manageable without requiring direct vendor API calls, the samples utilize ONNX Runtime's copy tensor API. For tasks requiring specialized visual processing, such as the FLUX.2 sample, the repository leverages ONNX Runtime 1.25 graphics interop capabilities alongside Vulkan and DirectX shaders to process GPU-resident resources natively.

Supported Workloads and Model Pipelines

The sample collection covers a range of practical computer vision, speech, and generative AI workloads. Automatic speech recognition samples include OpenAI Whisper for offline audio transcription, alongside NVIDIA Parakeet TDT and NVIDIA Nemotron ASR Streaming for real-time streaming audio pipelines.

For computer vision, the Meta SAM 2.1 sample provides interactive image and video segmentation capabilities to generate masks for object tracking and selection. For generative image creation, the FLUX.2-klein-4B sample demonstrates text-to-image generation. It shows how models quantized with NVIDIA Model Optimizer can serve as drop-in replacements, maintaining the same ONNX interface without requiring updates to application code.

Build Environment and Platform Limitations

DIN Deploy includes CMake presets configured to automatically fetch ONNX Runtime and TensorRT RTX dependencies during compilation. Supported target architectures include x86-64 and Arm64 across both Linux and Windows environments.

Certain features remain constrained by platform capabilities. While Vulkan graphics interop works cross-platform, DirectX integration is strictly limited to Windows systems. Additionally, while quantization techniques depend on specific underlying target hardware, the structural ONNX execution setup remains consistent across deployments.

AI-generated editorial illustration; not a documentary photograph.

Source: Build Local AI Apps with C++ and NVIDIA TensorRT RTX Samples

Share this article
FacebookThreadsLinkedInX

Leave a Reply

Your email address will not be published. Required fields are marked *