Skip to content

CUDAExecutionProvider Not Available / GPU Not Visible on NVIDIA T4 #7748

Description

Describe the bug
Do not see CUDAExecutionProvider or GPU available from ONNX Runtime even though onnxruntime-gpu is installed.

Urgency
In critical stage of project & hence urgent.

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux lab-am-vm 4.19.0-16-cloud-amd64 Set up CI with Azure Pipelines #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 GNU/Linux

  • ONNX Runtime installed from (source or binary): PIP Install

  • ONNX Runtime version:
    onnx==1.9.0
    onnxruntime==1.7.0
    onnxruntime-gpu==1.7.0

  • Python version: 3.7.10

  • CUDA/cuDNN version: release 11.0, V11.0.194

  • GPU model and memory: NVIDIA T4, 16G

To Reproduce

  • Describe steps/code to reproduce the behavior.
import onnxruntime as ort

ort.get_device()
>>> 'CPU'

ort.get_available_providers()
>>> ['CPUExecutionProvider']

Force setting code to CUDAExecutionProvider results in obvious error & inline with above telemetry:

import onnxruntime as ort

model_path = 'models/bart_large_cnn_fl/encoder/model.onnx'

providers = [
    ('CUDAExecutionProvider', {
        'device_id': 0,
        'arena_extend_strategy': 'kNextPowerOfTwo',
        'cuda_mem_limit': 2 * 1024 * 1024 * 1024,
        'cudnn_conv_algo_search': 'EXHAUSTIVE',
        'do_copy_in_default_stream': True,
    }),
    'CPUExecutionProvider',
]

session = ort.InferenceSession(model_path, providers=providers)

Error MSG
image

Expected behavior
Expecting device as GPU and provider as CUDAExecutionProvider

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions