Do not install both onnxruntime and onnxruntime-gpu #124
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In
requirements-gpu.txtthe requirement foronnxruntimeshould be removed. Only keeponnxruntime-gpuInstalling both
onnxruntimeandonnxruntime-gpuleads to undefined behavior as the CUDAExecutionProvider might not be available despite the GPU runtime package being installed. If both are installed, onnxruntime.get_device() may just randomly return "CPU" or "GPU".Actually
onnxruntime-gpualso contains the CPUExecutionProvider as fallback.Thanks for your feedback, i will try to test and fix that when i have time.
fix?
Workaround for now:
Make sure you KEEP onnxruntime-gpu in requirements-gpu.txt and don't uninstall it.
I already uninstall onnxruntime, but got error
With your venv activated, start up python and type:
This will print out your backend, either
GPUorCPU. In case you get on error like "no attribute" then your onnxruntime is not properly installed.I already uninstall onnxruntime, but I already install onnxruntime-gpu, I still get the error.