Visual profiling against the remote machine

The NVIDIA Visual Profiler also can profile remote applications. This feature eases the profiling task when it comes to remote application development, especially when you develop your application on the server-side.

There are several ways of using visual profilers, as follows:

  • Profiling on the host with the host CUDA application
  • By collecting profile data using the nvprof CLI on the target side, copying the file to the host, and opening it using the Visual Profiler
  • Profiling the application on the target platform using the host machine

Visual profiling directly in the host machine is convenient and can save development time. Also, remote profiling provides the same user experience that profiling a GPU application on a host machine does. One exception is that we should establish a remote connection. Another benefit OS host-managed visual profiling provides is that the profiler collects metric information on-demand automatically.

The NVIDIA profiler communicates with the NVIDIA profiler in the host machine and collects profiled data. Therefore, you need to confirm that your host machine – desktop or laptop – should connect to the remote machine. The following diagram shows the overview of this connection:

Let's try to profile a GPU application remotely. The following steps cover how to profile a remote GPU application in NVIDIA Visual Profiler:

  1. First, go to File | New session. When you click the New Session menu, you will see the following dialog window:

  1. Then, we need to add a connection, which we do by going to the Manage connection... menu. Then, the New Remote Connection dialog will appear. Add your remote machine information by clicking the Add button and putting your remote machine information in the appropriate sections. Then, close the dialog by clicking the Finish button. When you're finished, you will see the following output:

As we discussed previously, the host and remote machine communicate over SSH, whose default port number is 22. If the host machine uses another port for SSH, you have to inform it of that port number in the new remote session creation dialog.

  1. Now, we need to set up CUDA Toolkit paths in the remote machine by clicking the Manage... button at the right-hand side of Toolkit/ScriptA good start is to use the Detect button. It finds the nvcc path and sets up the configuration information automatically. If automatic detection failed, you have to input the configuration information manually. When you've finished with the configuration process, click the Finish button, as follows:

  1. Specify the GPU application's binary by clicking the Browse button on the right-hand side of the File text box. It will ask for your remote machine login password. Find your application path and set the application's path. You can also put the application's arguments if you need to control the application's behavior. When you've finished setting up the application and connection, click the Next button to set the profiler's options.
  1. Now, we will set up the profiling options. NVIDIA Visual Profiler allows us to set the profiler's options using checkboxes as shown in the following screenshot. By clicking Finish, the profiler collects profile data from the application:

You will see the timelined profiled output, as profiled on the host machine.

  1. Finally, analyze the performance of the profiled timeline graph. Click any kernel function you want to analyze. Click the Perform Kernel Analysis button; the profiler tool will collect the related metrics information. By doing this, you can quickly get a report regarding the performance limiters and find the bottlenecks of the kernel function.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.111.9