Problem with nsight

Hello,

Actually, I need to process some images with the jetson TX2.
I wanted to develop directly on the jetson TX2. So I began with codeblocks, but there is not a comprehensive system which allow to develop directly on the jetson. To perform my program, I have to use the GPU.

I need a tool which include debugger CPU/GPU, profile. A comprehensive tool !
The only seems to be nsight eclipse, and nsight eclipse doesn’t support jetson environment, so I have to use a host computer …
I have flashed the jetson from the host computer, and the environment development was installing in the same time in the host computer.

I tried a simple code :

#include<stdio.h>

global void cuda_hello(){
printf(“Hello World from GPU!\n”);
}
int main() {
cuda_hello<<<1,1>>>();
return 0;
}

I have the following error :

Incremental Build of configuration Debug for project Test_1
make all -C /home/jetson/Cuda_Target/Debug
make: Entering directory ‘/home/jetson/Cuda_Target/Debug’
Building file: …/main.cu
Invoking: NVCC Compiler
nvcc -G -g -O0 -ccbin aarch64-linux-gnu-g++ -gencode arch=compute_35,code=sm_35 -m64 -odir “.” -M -o “main.d” “…/main.cu”
subdir.mk:18: recipe for target ‘main.o’ failed
/bin/sh: 1: nvcc: not found
make: Leaving directory ‘/home/jetson/Cuda_Target/Debug’
make: [main.o] Error 127

I have nvcc, and I add the path in the host computer :
export PATH=/usr/local/cuda-10.0/bin:/usr/local/cuda-10.0/NsightCompute-1.0${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

I don’t understand the error.

Furthermore, I already have installed all librairies in the jetson to communicate with a Gige camera. Do I have to install all the libraries on the host computer too ? And how link the librairies ? I didn’t find a comprehensive example.

I have an other question. Does the host need to require hardware and software specification ? To flash the jetson, the host computer has to run with ubuntu 16.04/18.04, and at least 8Go of RAM. But only to develop code and connect by ssh, can I use a host computer which runs in windows, with 6Go of RAM ?

Thank you for your help !

Ok so actually the problem was because of the setting. The host computer has 86-64 cpu architecture, but I have to enter “native”, otherwise I have the error. Do you have an explanation ?

Now, I can compile the code, without any errors. But the hello word from GPU doesn’t work :
#include<stdio.h>
global void cuda_hello(){
*** printf(“Hello World from GPU!\n”);***
}
void hello(){
*** printf(“Hello \n”);***
}
int main() {
hello() ;
cuda_hello<<<1,1>>>() ;
return 0;
}

and the output is :
Hello

An idea ?

Thank you !

Hi,

To profile an application on Jetson, it’s recommended to use remote profiling rather than cross profiling.
Remote profiling builds and executes the application on the device with ssh, which releases you from installing all the libraries on host.

Properties → Build → Target Systems → Select remote connection

Thanks.

Hi,

Ok thank you ! But in that case, how can I indicate to nsight which librairies from the target I need ?
I already connect the connect the target and launch a sample.

I have an other question. Does the host need to require hardware and software specification ? To flash the jetson, the host computer has to run with ubuntu 16.04/18.04, and at least 8Go of RAM. But only to develop code and connect by ssh, can I use a host computer which runs in windows, with 6Go of RAM ?

Hi,

If you are using the remote compile and execution, there is no special requirement on your host.
Just make sure you can ssh Jetson device without issue.

Thanks.