JetPack 4.6上已经预装了CUDA, cuDNN and TensorRT, VPI 1.1
可以直接从官网下载(jetson sdk)使用拷贝到SD卡
JetPack 4.6 is the latest production release, and supports all Jetson modules including Jetson AGX Xavier Industrial module. JetPack 4.6 includes support for Triton Inference Server, new versions of CUDA, cuDNN and TensorRT, VPI 1.1 with support for new computer vision algorithms and python bindings, L4T 32.6.1 with Over-The-Air update features, security features, and a new flashing tool to flash internal or external media connected to Jetson.
1、查看cuda版本
cat /usr/local/cuda/version.txt
也可以使用 nvcc -V 查看,如果使用nvcc显示
kamiyuuki@kamiyuuki-desktop:~/Downloads$ nvcc
bash: nvcc: command not found
则需要在 ./bashrc 中添加路径,jack4.6默认装了cuda,tensorrt,cudnn
vim ~/.bashrc
#添加以下两行
export LD_LIBRARY_PATH=/usr/local/cuda/lib
export PATH=$PATH:/usr/local/cuda/bin
source ~/.bashrc //更新配置文件
kamiyuuki@kamiyuuki-desktop:~/Downloads$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Sun_Feb_28_22:34:44_PST_2021
Cuda compilation tools, release 10.2, V10.2.300
Build cuda_10.2_r440.TC440_70.29663091_0
CUDA
CUDA Toolkit provides a comprehensive development environment for C and C++ developers building GPU-accelerated applications. The toolkit includes a compiler for NVIDIA GPUs, math libraries, and tools for debugging and optimizing the performance of your applications.
JetPack 4.6 includes CUDA 10.2
2、查看cudnn版本
在PC上还是原来的老办法
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
但是发现在cudnn.h中找不到版本信息,而是在一个叫cudnn_version.h的文件夹里
~$ whereis cudnn_version
cudnn_version: /usr/include/cudnn_version.h
~$ cat /usr/include/cudnn_version.h | grep CUDNN_MAJOR
#define CUDNN_MAJOR 8
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)
~$ cat /usr/include/cudnn_version.h | grep CUDNN_MINOR
#define CUDNN_MINOR 2
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)
版本为8.2
cuDNN
CUDA Deep Neural Network library provides high-performance primitives for deep learning frameworks. It provides highly tuned implementations for standard routines such as forward and backward convolution, pooling, normalization, and activation layers.
JetPack 4.6 includes cuDNN 8.2.1
TensorRT可以直接在python里面查看确认,首先在终端中打开python(注意jacksdk中配置了python2.7和python3.6,如果输入python默认打开python2.7,输入python3 才是打开python3.6,同时如果使用archiconda不能设置默认开启conda环境,因为默认conda python环境中是打不开tensorrt的)
~$python3
Python 3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorrt as trt
>>> print(trt.__version__)
8.0.1.6
>>>
TensorRT
TensorRT is a high performance deep learning inference runtime for image classification, segmentation, and object detection neural networks. TensorRT is built on CUDA, NVIDIA’s parallel programming model, and enables you to optimize inference for all deep learning frameworks. It includes a deep learning inference optimizer and runtime that delivers low latency and high-throughput for deep learning inference applications.
JetPack 4.6 includes TensorRT 8.0.1
>>> import cv2
>>> print(cv2.__version__)
4.1.1
opencv等其他的python可载入环境都可以通过这样的方式确认版本
或者可以直接查看分别执行以下命令,即可查看自己的jetson nano 预搭载的CUDA版本
sudo pip3 install jetson-stats
sudo jtop