Win11 TensorRT environment deployment

1. CUDA and CUDNN installation

There are many installation tutorials for cuda and cudnn on the Internet. Here are some, so I won’t go into details. The specific links are as follows:

csdn.net - CUDA installation tutorial (super detailed) Original
zhihu.com - Detailed installation tutorial of CUDA+CUDNN for deep learning
tencent. com - CUDA installation tutorial (super detailed)
csdn.net - CUDA and cuDNN installation tutorial (super detailed) Original
juejin.cn - cuda and cudnn installation tutorial
tencent.com - Cuda and cuDNN installation tutorial (super detailed)

My configuration: py3.8 + cuda1.6 + cudnn8.9.0

Second, AnsoTensorRT

We can install the TensorRT version according to our personal cuda version.
Since the cuda version on my computer is 11.6, here I choose TensorRT8.6.
Insert image description hereInsert image description here

You can see that TensorRT8.6 version is compatible with cuda11.6. I'm using IDM here, so it downloaded quickly. The final download is a zip package, unzip the file, as shown in the figure below.
Insert image description here

3. Installation files

Unzip the downloaded TensorRT file and use pip install xxxxxx.whl to install the files in the following four TensorRT folders.

Insert image description here

Insert image description here
Insert image description here
Insert image description here
Insert image description here
The last folder has more files. I chose the one in the red box based on my python version. You can see that there are several other files of cp3.8. dispatch and lean are only available in the latest TensorRT version, not in the old version. The specific differences between these three files are as follows:
In TensorRT, these three files are all TensorRT Wheel packages for Windows systems and Python 3.8, but they represent different parts of the TensorRT library or Variations:

tensorrt-8.6.1-cp38-none-win_amd64.whl:

  • This file is the standard version of the Python Wheel package for TensorRT.
  • It contains the main functions of the TensorRT library for optimization and inference of deep learning models.
  • Suitable for general purposes requiring all the features of TensorRT.

tensorrt_lean-8.6.1-cp38-none-win_amd64.whl:

  • A "Lean" version may be a stripped-down version of TensorRT that may remove certain uncommon features or components to provide more efficient execution in resource-constrained environments.
  • This version may be particularly suitable for application scenarios that only require the core functions of TensorRT.

tensorrt_dispatch-8.6.1-cp38-none-win_amd64.whl:

  • The "Dispatch" version may include TensorRT's dynamic scheduling function, which means that it can dynamically select the most suitable processing logic or algorithm based on different input parameters or environmental conditions at runtime.
  • This can be useful for applications that need to run on many different configurations or hardware.

You can install the files corresponding to the python version of TensorRT according to your needs.

4. Add environment variables

Insert image description here
Insert image description here
You can see that TensorRT is installed successfully.

Finally, we use the test project that comes with TensorRT for environment detection:
Insert image description here
If your environment is installed successfully, you can see the following results by running the test project.
If your environment is installed successfully, you can see the following results by running the test project

at last:

My computer environment configuration:
python3.8 + cuda11.6 + cudnn8.9.0 + tensorrt8.6.1.6

Je suppose que tu aimes

Origine blog.csdn.net/s1_0_2_4/article/details/135026171
conseillé
Classement