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

Unable to use hardware acceleration on Windows #67

Closed
Chikage0o0 opened this issue Jul 22, 2023 · 8 comments · Fixed by #78
Closed

Unable to use hardware acceleration on Windows #67

Chikage0o0 opened this issue Jul 22, 2023 · 8 comments · Fixed by #78
Labels
ep: cuda related to cuda execution provider ep: tensorrt onnxruntime issue problem is not caused by ort stale

Comments

@Chikage0o0
Copy link

This is log.

2023-07-22T14:57:03.018264Z  INFO apply_execution_providers: ort::execution_providers: CUDA execution provider registered successfully
2023-07-22T14:57:03.053798Z ERROR apply_execution_providers: ort::execution_providers: CUDA execution provider registration failed: D:\a\_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1106 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "D:\Project\yolov8_onnx_rust\target\debug\onnxruntime_providers_cuda.dll"

2023-07-22T14:57:03.054196Z  INFO apply_execution_providers: ort::execution_providers: TensorRT execution provider registered successfully
2023-07-22T14:57:03.063023Z ERROR apply_execution_providers: ort::execution_providers: TensorRT execution provider registration failed: D:\a\_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1106 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "D:\Project\yolov8_onnx_rust\target\debug\onnxruntime_providers_tensorrt.dll"

I use Windows 11 22621.1992 .
Uses a dll that is automatically downloaded by the programme.

@decahedron1
Copy link
Member

Have you installed CUDA (>=11.6) and cuDNN (>=8.2.4)?

Also make sure to add the cuDNN libraries to PATH, or copy them from /bin to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin

@Chikage0o0
Copy link
Author

Ok now it works fine with 1.14, but 1.15 doesn't seem to work using cuda, tensorrt's features.

@decahedron1
Copy link
Member

What CUDA version do you have installed? Are you getting the same LoadLibrary failed with error 126 error in 1.15?

@Chikage0o0
Copy link
Author

Cuda 11.8
I deleted the compilation cache and now Cuda is fine, but Tensorrt prompts:

2023-07-22T15:59:19.752319Z WARN apply_execution_providers: ort::execution_providers: An error occurred when attempting to register `TensorrtExecutionProvider`: key/value cannot be empty 

@decahedron1 decahedron1 added onnxruntime issue problem is not caused by ort ep: cuda related to cuda execution provider ep: tensorrt labels Jul 23, 2023
@decahedron1 decahedron1 linked a pull request Aug 20, 2023 that will close this issue
Merged
8 tasks
@decahedron1
Copy link
Member

The TensorRT issue was fixed by #87 and is available in v1.15.4.

@18930215187
Copy link

The TensorRT issue was fixed by #87 and is available in v1.15.4.

@decahedron1 I still can't use tensorrt provider , but CUDA is fine.
version = 1.15.4, default-features = false, features = ["load-dynamic", "cuda", "tensorrt", "directml", "half"]

apply_execution_providers: ort::execution_providers: An error occurred when attempting to register TensorrtExecutionProvider: D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1131 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "G:\Environment\C\libort\onnxruntime_providers_tensorrt.dll"

@decahedron1
Copy link
Member

@18930215187
Copy link

18930215187 commented Sep 24, 2023

@18930215187 you're missing some prerequisite for TensorRT, see the ONNX Runtime and NVIDIA docs.

https://onnxruntime.ai/docs/execution-providers/TensorRT-ExecutionProvider.html#install https://docs.nvidia.com/deeplearning/tensorrt/install-guide/index.html

@decahedron1 Thanks for answer so fast. I checked my environment again and downloaded TensorRT for cuda 11.8, which helped me solve this problem. But another error occured like the following Information.
2023-09-24T17:10:01.506456Z WARN apply_execution_providers: ort::execution_providers: An error occurred when attempting to registerTensorrtExecutionProvider: D:\a\_work\1\s\onnxruntime\core\providers\tensorrt\tensorrt_execution_provider_info.cc:94 onnxruntime::TensorrtExecutionProviderInfo::FromProviderOptions [ONNXRuntimeError] : 1 : FAIL : provider_options_utils.h:148 onnxruntime::ProviderOptionsParser::Parse Unknown provider option: "trt_force_timing_cache"

I'm sorry to bother because of this stupid problem. I've run it correctly with cargo clean. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ep: cuda related to cuda execution provider ep: tensorrt onnxruntime issue problem is not caused by ort stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants