[Python] Why does onnxruntime fail to create CUDAExecutionProvider in Linux(Ubuntu 20)?

Discussão em 'Python' iniciado por Stack, Agosto 28, 2025.

  1. Stack

    Stack Membro Participativo

    import onnxruntime as rt
    ort_session = rt.InferenceSession(
    "my_model.onnx",
    providers=["CUDAExecutionProvider"],
    )


    onnxruntime (onnxruntime-gpu 1.13.1) works (in Jupyter VsCode env - Python 3.8.15) well when providers is ["CPUExecutionProvider"]. But for ["CUDAExecutionProvider"] it sometimes(not always) throws an error as:

    [W:eek:nnxruntime:Default, onnxruntime_pybind_state.cc:578 CreateExecutionProviderInstance] Failed to create CUDAExecutionProvider. Please reference https://onnxruntime.ai/docs/reference/execution-providers/CUDA-ExecutionProvider.html#requirements to ensure all dependencies are met.


    I tried following the provided link in the error, and tried different setups in the conda environment to test the code with various version combinations.

    Continue reading...

Compartilhe esta Página