菜单

TK1入初学软件教程-安装Nsight(九)

2018年5月18日 - TK1初学软件教程

TK1入初学软件教程-安装Nsight说明:

Nsight简介:

注意:

CUDA工具包安装:

https://developer.nvidia.com/cuda-downloads
$ sudo sh -c \ 'echo "foreign-architecture armhf" >> /etc/dpkg/dpkg.cfg.d/multiarch'
$ sudo apt-get update
$ sudo dpkg – i cuda-repo-ubuntu1204_6.0-37_amd64.deb
$ sudo apt-get update
$ sudo apt-get install cuda-cross-armhf
$ sudo apt-get install g ++  -  4.6-arm-linux-gnueabihf
$ sudo apt-get install cuda
$ export PATH=/usr/local/cuda/bin:$PATH
$ export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

导入Jetson TK1 CUDA样品到Nsight

请输入图片描述

构建您的第一个Jetson TK1应用程序:

-

scp [email protected]:/usr/lib/arm-linux-gnueabihf/libglut.so.3  /usr/arm-linux-gnueabihf/lib folder, with a symlink to libglut.so
scp [email protected]:/usr/lib/arm-linux-gnueabihf/tegra/libGL.so.1 /usr/arm-linux/gnueabihf/lib folder, with a symlink to libGL.so
scp [email protected]:/usr/lib/arm-linux-gnueabihf/libX11.so.6 /usr/arm-linux-gnueabihf/lib folder, with a symlink to libX11.so
Building file: ../src/boxFilter_kernel.cu
Invoking: NVCC Compiler
/usr/local/cuda-6.0/bin/nvcc -I"/usr/local/cuda-6.0/samples/3_Imaging" -I"/usr/local/cuda-6.0/samples/common/inc" 
-I"/home/satish/cuda-workspace_new/boxfilter-arm" -G -g -O0 -ccbin arm-linux-gnueabihf-g++-4.6 -gencode arch=compute_30,
code=sm_30 -gencode arch=compute_32,code=sm_32 --target-cpu-architecture ARM -m32 -odir "src" -M -o "src/boxFilter_kernel.d" 
"../src/boxFilter_kernel.cu"
/usr/local/cuda-6.0/bin/nvcc --compile -G -I"/usr/local/cuda-6.0/samples/3_Imaging" -I"/usr/local/cuda-6.0/samples/common/inc" 
-I"/home/satish/cuda-workspace_new/boxfilter-arm" -O0 -g -gencode arch=compute_30,code=compute_30 -gencode arch=compute_32,
code=sm_32 --target-cpu-architecture ARM -m32 -ccbin arm-linux-gnueabihf-g++-4.6  -x cu -o  "src/boxFilter_kernel.o" 
"../src/boxFilter_kernel.cu"
Finished building: ../src/boxFilter_kernel.cu

从Nsight运行您的第一个Jetson TK1应用程序:

请输入图片描述

static int icnt = 120;
while(!icnt--)
{
    cudaDeviceReset();
    _exit(EXIT_SUCCESS);
}

调试您的第一个Jetson TK1应用程序在Nsight

[email protected]:/home/ubuntu# echo N > sys/kernel/debug/gk20a.0/timeouts_enabled

请输入图片描述

在Nsight中分析您的第一个Jetson TK1应用程序

请输入图片描述

请输入图片描述

参考:

发表评论