﻿# ONNX Runtime provider order: graph partition priority is not request failover

Understand how ONNX Runtime execution-provider priority assigns graph regions and why a CUDA-first list does not promise every operation runs on GPU or retries on failure.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-onnxruntime-provider-priority-subgraph-partition/
Language: en

## A GPU session still contains CPU computation

A service creates a session with a GPU execution provider before the CPU provider. Operators unsupported by the GPU path remain on CPU, and intermediate transfers appear in the profile. This can be expected graph assignment rather than evidence that the session ignored its configuration. Separate the question of which provider receives each region from the question of how a failed request should be retried. A provider list is not an application availability design.

## Capability determines which regions can be assigned

The [execution-provider overview](https://onnxruntime.ai/docs/execution-providers/) describes provider capabilities and supported hardware targets. Support depends on the actual graph, types and provider implementation, not merely a matching device name. A provider can support a subset of the model or optimize a larger region. Record the concrete provider build and options when comparing assignments; different installations can expose different capabilities for an otherwise identical exported graph.

## Partitioning happens within runtime graph preparation

The [architecture guide](https://onnxruntime.ai/docs/reference/high-level-design.html) explains graph processing and provider partitioning. The resulting model can span execution targets. That makes boundary transfers and intermediate representation relevant to latency, even when the main matrix operations use GPU kernels. The [hybrid CPU and GPU guide](/journal/cpu-gpu-hybrid-architecture/) provides background on this division of work. Do not estimate the whole request from the device placement of its largest layer alone.

## The configured order gives a priority relation

The [Python API overview](https://onnxruntime.ai/docs/api/python/api_summary.html) describes provider ordering and session configuration. Inspect actual execution evidence rather than interpreting an ordered list as a promise that the first provider runs everything. Likewise, unsupported-node placement on CPU is distinct from recovering from a runtime exception after execution begins. Any application-level retry needs its own definition of safe repetition, error classification and observable terminal outcomes.

## Diagnose assignment before changing retry behavior

Collect a profile that identifies assigned regions and transfer boundaries for a representative request. Compare it against the same model and provider configuration after a release change. The [latency diagnosis guide](/journal/triton-latency-stage-diagnosis/) supplies a useful stage-based approach to interpretation, although ONNX Runtime has its own execution details. Report whether the problem is unsupported coverage, expensive boundaries or a runtime failure. These explanations call for different changes and should not be collapsed into the vague label GPU fallback.
