Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Performance] GPU Fallback to CPU Without Error When CUDA DLLs Are Missing #23372

Open
ibrahimsoliman97 opened this issue Jan 15, 2025 · 0 comments
Labels
ep:CUDA issues related to the CUDA execution provider performance issues related to performance regressions

Comments

@ibrahimsoliman97
Copy link

Describe the issue

When using ONNX Runtime with GPU and setting CUDA as the provider, if the model fails to load to the GPU due to missing CUDA DLLs or other issues, the execution falls back to the CPU without raising any error. This behavior results in the model running on the CPU while merely logging the error in the logs, but no explicit error is returned to the application.

This can lead to scenarios where the user is unaware that the execution has switched to the CPU, which might significantly impact performance.

Expected Behavior:
The behavior should raise an error and stop the execution if the GPU cannot be initialized correctly, ensuring that the user is immediately aware of the issue.

Current Behavior:

  • ONNX Runtime logs the issue (e.g., missing DLLs or GPU initialization errors).
  • The model seamlessly falls back to CPU execution.
  • No error is returned to the application.

To reproduce

  1. Set up ONNX Runtime with CUDA as the provider on a system missing required CUDA DLLs.
  2. Attempt to load a model.
  3. Observe the logs and the fallback to CPU without any error raised in the application.

Urgency

No response

Platform

Windows

OS Version

10

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

1.18.1

ONNX Runtime API

C++

Architecture

X64

Execution Provider

CUDA

Execution Provider Library Version

CUDA 11.8

Model File

No response

Is this a quantized model?

No

@ibrahimsoliman97 ibrahimsoliman97 added the performance issues related to performance regressions label Jan 15, 2025
@github-actions github-actions bot added the ep:CUDA issues related to the CUDA execution provider label Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ep:CUDA issues related to the CUDA execution provider performance issues related to performance regressions
Projects
None yet
Development

No branches or pull requests

1 participant