Environment:
- CentOS 7
- python 3.9.5
- CUDA: 11.4
- cudnn: 8.2.4
- onnxruntime-gpu: 1.9.0
- nvidia driver: 470.82.01
- 1 tesla v100 gpu
while onnxruntime seems to be recognizing the gpu, when inferencesession is created, no longer does it seem to recognize the gpu. the following code shows this symptom.
import onnxruntime as ort
print(f"onnxruntime device: {ort.get_device()}") # output: GPU
print(f'ort avail providers: {ort.get_available_providers()}') # output: ['CUDAExecutionProvider', 'CPUExecutionProvider']
ort_session = ort.InferenceSession(onnx_file, providers=["CUDAExecutionProvider"])
print(ort_session.get_providers()) # output: ['CPUExecutionProvider']
I have no idea what could cause the inferencesession to not detect and use the CUDA gpu.
I have tried reinstalling onnxruntime-gpu after removing onnxruntime and onnx package, but this problem persists.
any suggestions on where to look at?