Commit Graph
1 Commits
Author SHA1 Message Date
Nabheet S. Sandhu ef59366c2c fix(cuda): gracefully fallback when CUDA graph capture is unsupported
When enable_cuda_graph is True and the model contains operations that
cannot be fully partitioned to CUDA (e.g. Memcpy nodes from reshape
or concat ops), ONNX Runtime fails session creation fatally. This
prevents models like YOLOv8 from running on GPU with device: cuda.

Wrap the session creation in try/except and fall back to CUDA execution
without graph capture. Both paths still use CudaGraphRunner since it
works as a regular IOBinding runner even without graph capture.
2026-06-07 21:42:13 -06:00