CUDA development on Jetson AGX Orin Developer Kit

Hello everyone

This is my first post here. Apologies if it is a rather rudimentary question.

Back in early 2020, I did some work using CUDA on a Jetson Xavier development kit (trying to adapt and port some OpenCL code I had previously written). That seemed quite promising but I did not have time to do too much. I do now have more time available for this and would like to switch to an Orin device.

With the Xavier, I used Nsight Eclipse Edition v10.0 running in an Ubuntu 18.04.4 virtual machine on my Mac laptop. Having tried to understand the latest software (for use with Orin), I must confess to being slightly baffled. So, three questions (and apologies again if I am being a bit dim – or have simply failed to find the right information on the NVIDIA web pages):

  1. I would like to continue using an Eclipse IDE. Is it still necessary to run this, with the CUDA Toolkit, cross-compiling on a separate host (such as my Ubuntu VM), or can this all now be done on the Orin developer kit.

  2. Same question for the Nsight GPU profiling tools (I think that this does have to be run on a separate host, correct? … but I’d like to be sure of that).

  3. Can the IDE and Nsight profiling tools be run on Mac OS, or is it [still?] necessary to use Ubuntu or a LINUX variant? (Aside from the odd Raspberry Pi and the Jetson developer kits, I do not have any devices running Ubuntu natively, but can continue to do so in a VM if need be.)

Any advice and recommendations on the best way to go about installing the necessary tools (to do CUDA development for the Orin developer kit) would also be much appreciated.

Thanks …
Andrew

Hi,

1. Yes, please use a host machine for IDE.

2. If IDE is not required, there are some cli-based tools that can run on Orin directly.
For example, nsight-systems and nsight-compute. Please find these tools under the /opt/nvidia/ folder.

3. It’s expected to be the Ubuntu host.

As usual, the host tools for cross-compiling can be installed via JetPack directly.
Thanks.

Thank you for the speedy reply. That makes complete sense and confirms what I thought is the case.

Unfortunately, having now set up my new Orin developer kit and installed the Nsight Eclipse plug-ins on the host system, I am completely stuck. That is to say, I have no idea how to build my CUDA code in the (host system) IDE for use on the Orin.

With the Xavier developer kit, using the CUDA Toolkit 10.0 toolchain, Nsight Eclipse gave CUDA settings in the Build section of Properties for Debug or Release (for Xavier, I used PTX 7.2 and GPU 7.2). I actually built a static library which my code on the Xavier linked to.

It may be that I am missing something obvious, but I have been unable to build my code in the IDE with the CUDA 11.4 LINUX toolchain. I am not even sure that I have the new CUDA project that I have created correctly configured to cross-compile for the Orin.

So I am stuck, and would be most grateful if you could advise on how to use the new Nsight Eclipse plugin to create a CUDA project to cross-compile for the Jetson Orin (or simply point me to the relevant documentation, which I have not been able to find).

(And apologies again if I am missing stuff that ought to be obvious. I would freely admit that I am have very little experience with this stuff – I am simply keen to try using the new GPU in Orin for the sort of number theory programming that I do.)

Edit to add additional information:

When I try to compile my set of CUDA programs (which worked fine for Xavier with CUDA 10), the error message I am repeatedly getting is:

/usr/aarch64-linux-gnu/include/stdio.h(189): error: attribute “malloc” does not take arguments

This doesn’t make any sense to me and makes me think there may be something pretty rudimentary in what I am doing wrong …

Thank you again!

Andrew

If I may at least partially answer my own question (just in case this is of use to anyone else):

It looks like the malloc error message that I added to my previous post is a known problem. See here

So it looks like this was happening because I was trying to do the [cross-]compilation on an Ubuntu 22.04 host. Creating a clean 20.04 virtual machine did the trick. At least, I was then able to build my static library containing the GOU (CUDA) code, which seems to run – albeit not quite as quickly as I had hoped it might – on my Orin Developer Kit. My mistake for using what is, I suspect, an unsupported operating system level.

Having said that, I would still be very grateful for any advice or pointers to documentation that describes how best to configure (e.g. build parameters) Eclipse for cross-compiling CUDA code to run on Orin. It seems very likely that there may be ways to optimise code that I am not aware of. (Very likely, in fact!)

Thanks …
Andrew

Hi,

Since Nsight EE is deprecated, it is recommended to try our new generation tool.
For example, nsight compute which is located at /opt/nvidia/.

Thanks.

Thanks for the reply. It is actually the newer Nsight Eclipse plug-in that I am using, not the original Eclipse Edition. Sorry that was not clear.

Hi,

Thanks for the confirmation.

We are checking this internally.
Will share the setting for Orin cross-compiling with you later.

Thanks.

Hi,

The workflow should look like below

1. Install the nsightee_plugins
Help->Install New Software…->Add->Location

2. Create project

File->New->Other->C/C++ ->CUDA C/C++ Project

3. Setting CUDA Toolkit properties

Project->Properties->C/C++ Build->CUDA Toolkit
CUDA Toolkit: /usr/local/cuda-11.4/bin
Target OS: Linux
Target Architecture: AArch64
CCBIN: aarch64-lnux-gnu-g++

4. Setting GPU architecture properties

Project->Properties->C/C++ Build->Setting->Tool Settings->NVCC Compiler->CUDA
Generate SM 8.7 SASS
Generate SM 8.7 PTX

5. Test
We have confirmed that binary can work on Orin successfully.

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.