Developing CUDA Applications for NVIDIA Jetson with Nsight Eclipse Edition

Summary

This article guides you through the process of remote-developing CUDA applications for NVIDIA Jetson, an Arm-based development kit, using NVIDIA Nsight Eclipse Edition. Nsight Eclipse Edition is a full-featured, integrated development environment (IDE) that allows you to develop CUDA applications for both local and remote targets. Here, we will explore how to leverage Nsight Eclipse Edition for developing CUDA applications on Jetson, focusing on key features and steps involved in the development process.

Introduction to Nsight Eclipse Edition

Nsight Eclipse Edition is a unified CPU plus GPU integrated development environment designed for developing CUDA applications on Linux and Mac OS X for x86, POWER, and ARM platforms. It is bundled in the NVIDIA CUDA Toolkit, making it a comprehensive tool for developers at all stages of software development. Key features include:

  • Source Editor: Extended support for CUDA C and C++ syntax.
  • Project Management: Version control management system integration with CVS and Git support.
  • Build Integration: Configurable makefile-based NVCC build integration.
  • Debugging: Graphical user interface for debugging heterogeneous applications.
  • Profiling: Visual profiler with source code correlation for optimizing GPU code performance.

Setting Up Nsight Eclipse Edition

To start using Nsight Eclipse Edition, you need to install the CUDA Toolkit, which includes Nsight. Here are the steps to follow:

  1. Visit the NVIDIA CUDA Zone download page: Select the appropriate operating system.
  2. Download and Install the CUDA Driver: Follow the instructions to configure the CUDA Driver on your system.
  3. Download and Install the CUDA Toolkit: This will also install Nsight Eclipse Edition.
  4. Configure CUDA Toolkit: Ensure all necessary components are installed and configured correctly.

Creating a New Project in Nsight Eclipse Edition

To create a new project in Nsight Eclipse Edition, follow these steps:

  1. Open the New Project Wizard: File > New… > CUDA C/C++ Project.
  2. Specify Project Details: Enter the project name and location.
  3. Select Project Type: Choose CUDA Runtime Project for a simple CUDA runtime application.
  4. Specify Project Parameters: Select the target architecture and other parameters as needed.
  5. Complete the Wizard: The project will be displayed in the Project Explorer view, and the source editor will be opened.

Remote Development with Nsight Eclipse Edition

Nsight Eclipse Edition supports remote development of CUDA applications, allowing you to develop applications for Jetson without needing an NVIDIA GPU on your host system. There are two remote development modes:

  • Cross Compilation Mode: The project resides on the host system, and cross-compilation is done on the host. This mode is supported on Ubuntu x86 host systems.
  • Remote Synchronized Project Mode: The project resides on the host system and gets synchronized with the remote target system. Compilation is done natively on the remote system.

Developing for NVIDIA Jetson

For developing CUDA applications on Jetson, you can use Nsight Eclipse Edition in remote development mode. Here are the key points to consider:

  • Jetson Setup: Jetson comes prepopulated with Linux for Tegra (L4T), a modified Ubuntu Linux distribution provided by NVIDIA.
  • CUDA Toolkit: The CUDA Toolkit and OpenGL drivers are included in the software stack provided by NVIDIA.
  • Remote Development: Use Nsight Eclipse Edition to develop CUDA applications remotely on Jetson.

Table: Key Features of Nsight Eclipse Edition

Feature Description
Source Editor Extended support for CUDA C and C++ syntax.
Project Management Version control management system integration with CVS and Git support.
Build Integration Configurable makefile-based NVCC build integration.
Debugging Graphical user interface for debugging heterogeneous applications.
Profiling Visual profiler with source code correlation for optimizing GPU code performance.

Table: Steps for Creating a New Project in Nsight Eclipse Edition

Step Description
1. Open New Project Wizard File > New… > CUDA C/C++ Project.
2. Specify Project Details Enter project name and location.
3. Select Project Type Choose CUDA Runtime Project.
4. Specify Project Parameters Select target architecture and other parameters.
5. Complete Wizard Project will be displayed in Project Explorer view.

Table: Remote Development Modes in Nsight Eclipse Edition

Mode Description
Cross Compilation Mode Project resides on host system, cross-compilation done on host.
Remote Synchronized Project Mode Project resides on host system, synchronized with remote target system.

Conclusion

Nsight Eclipse Edition is a powerful tool for developing CUDA applications, offering a comprehensive set of features for both local and remote development. By following the steps outlined in this article, you can effectively use Nsight Eclipse Edition to develop CUDA applications for NVIDIA Jetson, leveraging its capabilities for efficient and effective GPU computing.