Description

I installed TensorRT and CUDNN on Windows for using with yoloV8. Following nvidia documentation (zip installation): TensorRT installation documentation

But when I ran this code on Python3.11:

import tensorrt 
print(tensorrt.__version__) 
assert tensorrt.Builder(tensorrt.Logger())

this happens: Output image

8.6.1

[11/26/2023-11:38:09] [TRT] [E] 6: [libLoader.cpp::nvinfer1::rt::DynamicLibrary::Impl::Impl::290] Error Code 6: Internal Error (Unable to load library: nvinfer_builder_resource.dll) Traceback (most recent call last): File "d:\Project\test-projects\ultra\main.py", line 3, in <module> assert tensorrt.Builder(tensorrt.Logger()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: pybind11::init(): factory function returned nullptr

"nvinfer_builder_resource.dll" this file is located on "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin" and this location is added on system environment path.

what can I do for resolve this error.

Environment

TensorRT Version: 8.6.1.6

GPU Type: NVIDIA GeForce RTX 4060

Nvidia Driver Version: 536.40

CUDA Version: 12.1

CUDNN Version: 8.9.0.131

Operating System + Version: Windows 11

Python Version (if applicable): 3.11

TensorFlow Version (if applicable):

PyTorch Version (if applicable): 2.1.1

Baremetal or Container (if container which image + tag):

Steps To Reproduce

It can be help you:

import torch
import tensorrt
print(tensorrt.__version__)
print(torch.version.cuda)
print(torch.backends.cudnn.version())

Output:

8.6.1

12.1

8801

Installation steps for TensorRT: https://docs.nvidia.com/deeplearning/tensorrt/archives/tensorrt-861/install-guide/index.html#installing-zip

Installation steps for CUDNN: https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#install-windows

Unable to load library: nvinfer_builder_resource.dll resolve this error.

0

There are 0 best solutions below