MatX on Orin NX

Hello,

I am exploring the use of MatX library on our Orin NX developer Kit. MatX has the following requirements:

”MatX is using features in C++20 and the latest CUDA compilers and libraries. For this reason, when running with GPU support, CUDA 12.2.1 and g++9, nvc++ 24.5, or clang 17 or newer is required.”

I have:

JetPack 6.2

CUDA 12.6.68,

g++ 11.4.0.

clang –version results gives the following output “clang version of Ubuntu clang version 14.0.0-1ubuntu1.1

cmake 4.0.1

On trying to do make in MatX after the cmake, I observe a compile error that is not found. Is possibly from C++20?

Has any one come across this issue ? How can it be resolved?

Thank you,

Vangogh

Here is the output of the make

[ 1%] Building CUDA object examples/CMakeFiles/simple_radar_pipeline.dir/simple_radar_pipeline.cu.o
In file included from /work/gpu_math/MatX/include/matx/core/error.h:45,
from /gpu_math/MatX/include/matx.h:44,
from /gpu_math/MatX/examples/simple_radar_pipeline.h:34,
from /gpu_math/MatX/examples/simple_radar_pipeline.cu:33:
/gpu_math/MatX/include/matx/core/log.h:38:10: fatal error: format: No such file or directory
38 | include
| ^~~~~~~~
compilation terminated.
In file included from /work/gpu_math/MatX/include/matx/core/error.h:45,
from /work/gpu_math/MatX/include/matx.h:44,
from /work/gpu_math/MatX/examples/simple_radar_pipeline.h:34,
from /work/gpu_math/MatX/examples/simple_radar_pipeline.cu:33:
/work/gpu_math/MatX/include/matx/core/log.h:38:10: fatal error: format: No such file or directory
38 | include
| ^~~~~~~~
compilation terminated.

<format> is indeed a C++20 feature
And MatX does have it in a header file.

When I was trying things on godbolt, it seemed that nvcc did not handle it properly until CUDA 13.0. That’s just an observation, I haven’t looked into it carefully.

I don’t know if/when CUDA 13 will be available in a Jetpack, or if it will be available for Orin NX. You may get better help on the orin NX forum. (It looks like Jetpack 7 has CUDA 13.0 in it, but I don’t know if Jetpack 7 will be available for Orin NX.)

After discussing with a colleague, it seems that the issue is ultimately connected to the version of g++ in use (which nvcc makes use of, for host code).

I suppose you could try updating your g++ to 12.x or newer; that should fix it, but I don’t have a recipe for you and I’m not sure if that is a good idea in a Jetson setup (it may affect other parts of the software install.)

The suggested workaround would be to use the v0.9.4 release of MatX, which is one older than latest/master currently (so not very old) and does not make use of <format>

You can also file a github issue for MatX, if you wish.

Robert,

Thank you for getting back on this. That sounds like a good approach. I will definitely try it out.

Again,

Thank you very much!

-vangogh