Tx2 Nvidia Visual profiler

Hi Folks,

I am looking to diagnose my code with visual profiler. I am able to ‘launch and attach to’ my executable from profiler running on host. THe profiler is almost working. However I am not able to see my code symbols (function names) - I see addresses instead. I am suspecting that I am missing few components in system which supports symbol resolution. May be I am not compiling my executable with right profiling option.

  1. Is there a integrated list of prerequisites which need to be installed, on jetson tx2, in order to support profiler ? I see few components mentioned here -
https://www.youtube.com/watch?v=R_GzhZe8IcM

When I try to install these components I run into -

nvidia@tegra-ubuntu:~$ sudo apt-get install libstdc++6-4.8-dbg
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  libuv1
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  gcc-4.8-base libgcc-4.8-dev libgcc1-dbg libstdc++-4.8-dev
Suggested packages:
  libstdc++-4.8-doc
The following NEW packages will be installed:
  gcc-4.8-base libgcc-4.8-dev libgcc1-dbg libstdc++-4.8-dev libstdc++6-4.8-dbg
0 upgraded, 5 newly installed, 0 to remove and 274 not upgraded.
1 not fully installed or removed.
Need to get 3,951 kB of archives.
After this operation, 36.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ports.ubuntu.com/ubuntu-ports xenial/universe arm64 gcc-4.8-base arm64 4.8.5-4ubuntu2 [15.3 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports xenial/universe arm64 libgcc-4.8-dev arm64 4.8.5-4ubuntu2 [162 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports xenial/universe arm64 libstdc++-4.8-dev arm64 4.8.5-4ubuntu2 [1,052 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 libgcc1-dbg arm64 1:6.0.1-0ubuntu1 [79.9 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports xenial/universe arm64 libstdc++6-4.8-dbg arm64 4.8.5-4ubuntu2 [2,642 kB]
Fetched 3,951 kB in 2s (1,695 kB/s)           
Selecting previously unselected package gcc-4.8-base:arm64.
(Reading database ... 221791 files and directories currently installed.)
Preparing to unpack .../gcc-4.8-base_4.8.5-4ubuntu2_arm64.deb ...
Unpacking gcc-4.8-base:arm64 (4.8.5-4ubuntu2) ...
Selecting previously unselected package libgcc-4.8-dev:arm64.
Preparing to unpack .../libgcc-4.8-dev_4.8.5-4ubuntu2_arm64.deb ...
Unpacking libgcc-4.8-dev:arm64 (4.8.5-4ubuntu2) ...
Selecting previously unselected package libstdc++-4.8-dev:arm64.
Preparing to unpack .../libstdc++-4.8-dev_4.8.5-4ubuntu2_arm64.deb ...
Unpacking libstdc++-4.8-dev:arm64 (4.8.5-4ubuntu2) ...
Selecting previously unselected package libgcc1-dbg:arm64.
Preparing to unpack .../libgcc1-dbg_1%3a6.0.1-0ubuntu1_arm64.deb ...
Unpacking libgcc1-dbg:arm64 (1:6.0.1-0ubuntu1) ...
Selecting previously unselected package libstdc++6-4.8-dbg:arm64.
Preparing to unpack .../libstdc++6-4.8-dbg_4.8.5-4ubuntu2_arm64.deb ...
Unpacking libstdc++6-4.8-dbg:arm64 (4.8.5-4ubuntu2) ...
Setting up fluxgui (1:1.1.11~pre~20171222-gf22fdbf-1~xenial) ...

Unsupported platform: 'arm64'
fluxgui is NOT installed.
dpkg: error processing package fluxgui (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up gcc-4.8-base:arm64 (4.8.5-4ubuntu2) ...
Setting up libgcc-4.8-dev:arm64 (4.8.5-4ubuntu2) ...
Setting up libstdc++-4.8-dev:arm64 (4.8.5-4ubuntu2) ...
Setting up libgcc1-dbg:arm64 (1:6.0.1-0ubuntu1) ...
Setting up libstdc++6-4.8-dbg:arm64 (4.8.5-4ubuntu2) ...
Errors were encountered while processing:
 fluxgui
E: Sub-process /usr/bin/dpkg returned an error code (1)
  1. Do I need to necessarily compile code with -g option to support profiling ?

Please help.

Thanks

Hi,

This page can give you some information:
https://devblogs.nvidia.com/cuda-jetson-nvidia-nsight-eclipse-edition/

To add include path:
Build → Settings → Tool Settings → NVCC Compiler → Includes → Include paths → Add **
To add link path:
Build → Settings → Tool Settings → NVCC Linker → Libraries → Library search path → Add ***
To add link libraries:
Build → Settings → Tool Settings → NVCC Linker → Libraries → Libraries → Add ***

Thanks.

Thanks AastaLLL.

You suggestion/method, seems to be that of cross-compiling application from nsight. Would be it possible to profile an exe/application which was built/compiled natively on TX2 , using nvidia system profiler ?

I am using nvidia system profiler but that does not seem to show symbols from my executable .

Thanks

Hi,

NVIDIA system profiler cannot be executed directly on the Jetson platform.
You can find the support platform information on our website:

https://developer.nvidia.com/nvidia-system-profiler

Supported host PC operating systems:
    Windows 7/8.1/10
    Mac OSX (10.9
    Linux Ubuntu v14.04
    Linux Ubuntu v16.04

Supported target platforms: # indicates cross-compiling 
    Tegra K1/X1/X2 64-bit Developer Kits
    Jetson TX2 Developer Kit
    Jetson TX1 Developer Kit
    Jetson TK1 Developer Kit

Thanks

Hi AastaLLL,

I am running nvidia system profiler on Windows machine. It is not being run on Jetson platform.

The problem is when I run on windows machine, I am able to trigger/launch my executable on jetson tx2 (from nvidia system profiler running on win ) but the profiler does not show my function names.

Thanks

Hi,

Thanks for the update.
We will check this internally and update information with you later.

Hi,

Confirmed that Nvidia System Profiler(v3.9) works correctly on Windows 7 environment(64-bit).
Could you try it again?

Download link: https://developer.nvidia.com/gameworksdownload#

Thanks.

Thanks AastaLLL. After reinstallation, I get the symbols I was looking for (from my code). Would close this if I do not have more follow up questions.

Thanks

Hi Folks,

I would like to profile my cuda kernel for its memory accesses. I would like to figure out whether my kernel is causing mis-aligned memory access or not , and whether my memory accesses are getting properly coalesced or not ?

What are my tool set options to do so ? Can I do this this with Nvidia System profiler 3.9 running on windows ? Or do I strictly need to to do this from nsight (by cross compiling my TX2 application) ?

THanks

Dear Nvidia folks,
Can you please help ?
Thanks

Hi,

NVIDIA system profiler is more focusing on the system and CPU related profiling.

For GPU memory, there are two more suitable tools for your reference:

1. NVIDIA Visual Profiler
[url]https://developer.nvidia.com/nvidia-visual-profiler[/url]

2. cuda-memcheck in CUDA toolkit
[url]https://docs.nvidia.com/cuda/cuda-memcheck/index.html[/url]

Thanks