blog

Profile in the Cloud with Nsight Systems

How to profile CUDA code on cloud GPU instances using Nsight Systems.
2 min read /

Nsight Systems can connect to a remote machine via SSH to profile programs using CUDA. Data is collected remotely, but data downloaded for analysis locally.

You will need to know the 👤user and 🏠host of the remote instance to which to connect. It will also need to be set up with a 🔑key or ✳️password that you can use to access it. If you need to set up a GPU instance on which to run your code, see the roundup of cloud service providers.

  1. Install Nsight Systems
    Instructions are available at the Nsight Systems website. Alternatively, and perhaps more usually, Nsight Systems is installed as part of the CUDA Toolkit bundle. See the CUDA website for installation instructions. If installing this way, you only need to install the CUDA Toolkit, not the CUDA Driver, unless you are also planning to run CUDA code on your local machine.
  2. Start Nsight Systems
    If necessary, start a fresh project with File > New Project.
  3. Connect to the remote instance
    Click Select target for profiling and choose Configure targets. Click the Create a new connection button. Enter your 🏠host and 👤user then click OK, Connect, Close. If you are using a ✳️password you may be prompted for it. A message will show installation status and eventually Target is ready.
  4. Collect profile information
    Configure options and click Start to begin. Data is collected remotely but downloaded for analysis locally—a connection is not needed for reading reports.

The screen recording below demonstrates the steps.

Screen recording demonstrating how to connect to a remote instance via SSH in Nsight Systems.