当前位置:   article > 正文

Jetson TX2 初体验_jetsontx2板载供电

jetsontx2板载供电

阅读原文请点击

摘要: # 0. 简介 Jetson TX2【1】是基于 NVIDIA Pascal™ 架构的 AI 单模块超级计算机,性能强大(1 TFLOPS),外形小巧,节能高效(7.5W),非常适合机器人、无人机、智能摄像机和便携医疗设备等智能终端设备。 Jatson TX2 与 TX1 相比,内存和 eMMC 提高了一倍,CUDA 架构升级为 Pascal,每瓦性能提高一倍,支持 Jetson TX1

0. 简介

Jetson TX2【1】是基于 NVIDIA Pascal™ 架构的 AI 单模块超级计算机,性能强大(1 TFLOPS),外形小巧,节能高效(7.5W),非常适合机器人、无人机、智能摄像机和便携医疗设备等智能终端设备。
Jatson TX2 与 TX1 相比,内存和 eMMC 提高了一倍,CUDA 架构升级为 Pascal,每瓦性能提高一倍,支持 Jetson TX1 模块的所有功能,支持更大、更深、更复杂的深度神经网络。
image.png

TX2 内部结构如下:
image.png

1. 开箱

过程细节不展开,板卡上电后来张照片:
image.png

2. 刷机

TX2 出厂时,已经自带了 Ubuntu 16.04 系统,可以直接启动。但一般我们会选择刷机,目的是更新到最新的 JetPack L4T,并自动安装最新的驱动、CUDA Toolkit、cuDNN、TensorRT。

刷机注意以下几点:

  • Host 需要安装 Ubuntu 14.04,至少预留 15 GB 硬盘空间,不要用 root 用户运行 JetPack-${VERSION}.run,我用的是 JetPack-L4T-3.1-linux-x64.run
  • TX2 需要进入 Recovery Mode,参考随卡自带的说明书步骤
  • 刷机时间大概需要 1~2 小时,会格式化 eMMC,主要备份数据

3. 运行视频目标检测 Demo

刷机成功后,重启 TX2,连接键盘鼠标显示器,就可以跑 Demo 了。

nvidia@tegra-ubuntu:~/tegra_multimedia_api/samples/backend$ ./backend 1 ../../data/Video/sample_outdoor_car_1080p_10fps.h264 H264 --trt-deployfile ../../data/Model/GoogleNet_one_class/GoogleNet_modified_oneClass_halfHD.prototxt --trt-modelfile ../../data/Model/GoogleNet_one_class/GoogleNet_modified_oneClass_halfHD.caffemodel --trt-forcefp32 0 --trt-proc-interval 1 -fps 10

视频截图如下:
image.png

4. 运行 TensorRT Benchmark

TensorRT 【3】是 Nvidia GPU 上的深度学习 inference 优化库,可以将训练好的模型通过优化器生成 inference 引擎
image.png

将 TX2 设置为 MAXP (最高性能)模式,运行 TensorRT 加速的 GoogLeNet、VGG16 得到处理性能如下:
image.png
image.png

5. TX2 不支持的 feature

  • 不支持 int8
  • 待发现

参考文献

【1】嵌入式系统开发者套件和模块 | NVIDIA Jetson | NVIDIA
【2】Download and Install JetPack L4T
【3】TensorRT

附录

deviceQuery

  1. nvidia@tegra-ubuntu:~/work/TensorRT/tmp/usr/src/tensorrt$ cd /usr/local/cuda/samples/1_Utilities/deviceQuery
  2. nvidia@tegra-ubuntu:/usr/local/cuda/samples/1_Utilities/deviceQuery$ ls
  3. deviceQuery deviceQuery.cpp deviceQuery.o Makefile NsightEclipse.xml readme.txt
  4. nvidia@tegra-ubuntu:/usr/local/cuda/samples/1_Utilities/deviceQuery$ ./deviceQuery
  5. ./deviceQuery Starting...
  6. CUDA Device Query (Runtime API) version (CUDART static linking)
  7. Detected 1 CUDA Capable device(s)
  8. Device 0: "NVIDIA Tegra X2"
  9. CUDA Driver Version / Runtime Version 8.0 / 8.0
  10. CUDA Capability Major/Minor version number: 6.2
  11. Total amount of global memory: 7851 MBytes (8232062976 bytes)
  12. ( 2) Multiprocessors, (128) CUDA Cores/MP: 256 CUDA Cores
  13. GPU Max Clock rate: 1301 MHz (1.30 GHz)
  14. Memory Clock rate: 1600 Mhz
  15. Memory Bus Width: 128-bit
  16. L2 Cache Size: 524288 bytes
  17. Maximum Texture Dimension Size (x,y,z) 1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)
  18. Maximum Layered 1D Texture Size, (num) layers 1D=(32768), 2048 layers
  19. Maximum Layered 2D Texture Size, (num) layers 2D=(32768, 32768), 2048 layers
  20. Total amount of constant memory: 65536 bytes
  21. Total amount of shared memory per block: 49152 bytes
  22. Total number of registers available per block: 32768
  23. Warp size: 32
  24. Maximum number of threads per multiprocessor: 2048
  25. Maximum number of threads per block: 1024
  26. Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  27. Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535)
  28. Maximum memory pitch: 2147483647 bytes
  29. Texture alignment: 512 bytes
  30. Concurrent copy and kernel execution: Yes with 1 copy engine(s)
  31. Run time limit on kernels: No
  32. Integrated GPU sharing Host Memory: Yes
  33. Support host page-locked memory mapping: Yes
  34. Alignment requirement for Surfaces: Yes
  35. Device has ECC support: Disabled
  36. Device supports Unified Addressing (UVA): Yes
  37. Device PCI Domain ID / Bus ID / location ID: 0 / 0 / 0
  38. Compute Mode:
  39. < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
  40. deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 8.0, CUDA Runtime Version = 8.0, NumDevs = 1, Device0 = NVIDIA Tegra X2
  41. Result = PASS

内存带宽测试

  1. nvidia@tegra-ubuntu:/usr/local/cuda/samples/1_Utilities/bandwidthTest$ ./bandwidthTest
  2. [CUDA Bandwidth Test] - Starting...
  3. Running on...
  4. Device 0: NVIDIA Tegra X2
  5. Quick Mode
  6. Host to Device Bandwidth, 1 Device(s)
  7. PINNED Memory Transfers
  8. Transfer Size (Bytes) Bandwidth(MB/s)
  9. 33554432 20215.8
  10. Device to Host Bandwidth, 1 Device(s)
  11. PINNED Memory Transfers
  12. Transfer Size (Bytes) Bandwidth(MB/s)
  13. 33554432 20182.2
  14. Device to Device Bandwidth, 1 Device(s)
  15. PINNED Memory Transfers
  16. Transfer Size (Bytes) Bandwidth(MB/s)
  17. 33554432 35742.8
  18. Result = PASS
  19. NOTE: The CUDA Samples are not meant for performance measurements. Results may vary when GPU Boost is enabled.

GEMM 测试

  1. nvidia@tegra-ubuntu:/usr/local/cuda/samples/7_CUDALibraries/batchCUBLAS$ ./batchCUBLAS -m1024 -n1024 -k1024
  2. batchCUBLAS Starting...
  3. GPU Device 0: "NVIDIA Tegra X2" with compute capability 6.2
  4. ==== Running single kernels ====
  5. Testing sgemm
  6. #### args: ta=0 tb=0 m=1024 n=1024 k=1024 alpha = (0xbf800000, -1) beta= (0x40000000, 2)
  7. #### args: lda=1024 ldb=1024 ldc=1024
  8. ^^^^ elapsed = 0.00372291 sec GFLOPS=576.83
  9. @@@@ sgemm test OK
  10. Testing dgemm
  11. #### args: ta=0 tb=0 m=1024 n=1024 k=1024 alpha = (0x0000000000000000, 0) beta= (0x0000000000000000, 0)
  12. #### args: lda=1024 ldb=1024 ldc=1024
  13. ^^^^ elapsed = 0.10940003 sec GFLOPS=19.6296
  14. @@@@ dgemm test OK
  15. ==== Running N=10 without streams ====
  16. Testing sgemm
  17. #### args: ta=0 tb=0 m=1024 n=1024 k=1024 alpha = (0xbf800000, -1) beta= (0x00000000, 0)
  18. #### args: lda=1024 ldb=1024 ldc=1024
  19. ^^^^ elapsed = 0.03462315 sec GFLOPS=620.245
  20. @@@@ sgemm test OK
  21. Testing dgemm
  22. #### args: ta=0 tb=0 m=1024 n=1024 k=1024 alpha = (0xbff0000000000000, -1) beta= (0x0000000000000000, 0)
  23. #### args: lda=1024 ldb=1024 ldc=1024
  24. ^^^^ elapsed = 1.09212208 sec GFLOPS=19.6634
  25. @@@@ dgemm test OK
  26. ==== Running N=10 with streams ====
  27. Testing sgemm
  28. #### args: ta=0 tb=0 m=1024 n=1024 k=1024 alpha = (0x40000000, 2) beta= (0x40000000, 2)
  29. #### args: lda=1024 ldb=1024 ldc=1024
  30. ^^^^ elapsed = 0.03504515 sec GFLOPS=612.776
  31. @@@@ sgemm test OK
  32. Testing dgemm
  33. #### args: ta=0 tb=0 m=1024 n=1024 k=1024 alpha = (0xbff0000000000000, -1) beta= (0x0000000000000000, 0)
  34. #### args: lda=1024 ldb=1024 ldc=1024
  35. ^^^^ elapsed = 1.09177494 sec GFLOPS=19.6697
  36. @@@@ dgemm test OK
  37. ==== Running N=10 batched ====
  38. Testing sgemm
  39. #### args: ta=0 tb=0 m=1024 n=1024 k=1024 alpha = (0x3f800000, 1) beta= (0xbf800000, -1)
  40. #### args: lda=1024 ldb=1024 ldc=1024
  41. ^^^^ elapsed = 0.03766394 sec GFLOPS=570.17
  42. @@@@ sgemm test OK
  43. Testing dgemm
  44. #### args: ta=0 tb=0 m=1024 n=1024 k=1024 alpha = (0xbff0000000000000, -1) beta= (0x4000000000000000, 2)
  45. #### args: lda=1024 ldb=1024 ldc=1024
  46. ^^^^ elapsed = 1.09389901 sec GFLOPS=19.6315
  47. @@@@ dgemm test OK
  48. Test Summary
  49. 0 error(s)

阅读原文请点击

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/144311
推荐阅读
  

闽ICP备14008679号