Skip to main content
ONNX Runtime GenAI supports multiple hardware acceleration providers to optimize model inference across different platforms. Each execution provider targets specific hardware and offers unique performance characteristics.

Available Execution Providers

ONNX Runtime GenAI supports the following execution providers:

CUDA

NVIDIA GPU acceleration with comprehensive memory management

DirectML

Cross-vendor GPU acceleration on Windows platforms

OpenVINO

Intel hardware optimization for CPU, GPU, and NPU

QNN

Qualcomm NPU acceleration for edge and mobile devices

WebGPU

Browser-based GPU acceleration using WebGPU API

Platform Compatibility Matrix

Hardware Type Support

Performance Considerations

Memory Management

Each provider handles memory differently:
  • CUDA: Device memory with host-pinned allocations for efficient transfers
  • DirectML: D3D12 resource management with upload/readback heaps
  • OpenVINO: CPU-accessible memory with optional device acceleration
  • QNN: CPU-accessible NPU memory
  • WebGPU: GPU buffers with async CPU-GPU synchronization

Precision Support

All providers support full precision (FP32) inference.

Provider Selection Guide

Choose the right provider based on your deployment scenario:

Server Deployment

Windows Desktop

Edge Devices

Mobile Deployment

Configuration in genai_config.json

Providers can be configured directly in your model’s genai_config.json:
The provider_options array specifies execution providers in priority order. ONNX Runtime will use the first available provider.

Device Filtering

For multi-device systems, you can filter by hardware type:
Provider availability depends on your installation. Install provider-specific packages:
  • CUDA: onnxruntime-genai-cuda
  • DirectML: onnxruntime-genai-directml
  • Other providers may require building from source.

Next Steps

CUDA Setup

Configure NVIDIA GPU acceleration

DirectML Setup

Enable DirectML on Windows

OpenVINO Setup

Optimize for Intel hardware

QNN Setup

Deploy to Qualcomm devices