Jetson Orin processor features (unknown architectural extension 'flagm')

Hi, all.
I have a question about utilizing CPU features on Jetson AGX Orin.

My development environment is as follows:

  • Jetson AGX Orin Development Kit(32GB)
  • Flashed with the lastest Jetpack release r35.4.1

The problem occurs when I tried to compile my source code using gcc-11 with -march=native compile option. I know that official supported gcc version stays on 9, but I need to build a project which contains c++20 features.

While building my project, compilation errors printed as below:

[build] Assembler messages:
[build] Error: unknown architectural extension 'flagm'
[build] Error: unrecognized option -march=armv8.2-a+crypto+fp16+rcpc+dotprod+flagm

I have never experienced until the -march=native option is given, so started to investigate which compile options are provided via the keyword native for both gcc-9 and gcc-11.

$ /usr/bin/gcc-11 -Q -march=native --help=target
The following options are target specific:
  -mabi=                                lp64
  -march=                               armv8.2-a+crypto+fp16+rcpc+dotprod+flagm
  -mbig-endian                          [disabled]
  -mbionic                              [disabled]
...
Assembler messages:
Error: unknown architectural extension 'flagm'
Error: unrecognized option -march=armv8.2-a+crypto+fp16+rcpc+dotprod+flagm
$ /usr/bin/gcc-9 -Q -march=native --help=target
The following options are target specific:
  -mabi=                                lp64
  -march=                               armv8-a
  -mbig-endian                          [disabled]
  -mbionic                              [disabled]
...
(no error messages)

The output messages indicate that error generated from the compile option flagm that came from cpu features. As far as I know, gcc-9 does not support cortex A87ae(I found this information at here) optimization options while gcc-11 has optimization features for my Jetson device.
It seems to be gcc-11 found all the cpu features and get them into native. (I am not familiar with this level, so it might be wrong guess). The features are listed like,

$ cat /proc/cpuinfo 
processor       : 0
model name      : ARMv8 Processor rev 1 (v8l)
BogoMIPS        : 62.50
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp uscat ilrcpc flagm
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd42
CPU revision    : 1
...

Also, I was able to find this flagm instruction on official Arm document. For my understanding, the project should be built since the compiler supports optimization options for Arm cortex a87ae.

I really cannot understand why gcc-11 complaining about flagm.
Any possible reasons?

Hi,
Please share the steps so that we can check and see if gcc 11 can be supported on 20.04. By default gcc version is

$ gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

And do you know if it is gcc 11 in Ubunut 22.04?

Hi @DaneLLL

Here are the version output of gcc-9 and gcc-11 those I used.

$ /usr/bin/gcc-9 --version 
gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 
Copyright (C) 2019 Free Software Foundation, Inc. 
This is free software; see the source for copying conditions. There is NO 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ /usr/bin/gcc-11 --version 
gcc-11 (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0 
Copyright (C) 2021 Free Software Foundation, Inc. 
This is free software; see the source for copying conditions. There is NO 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

And yes, this is the same release version that Ubuntu 22.04 LTS uses as default.

Sorry for the possible confusion, the messages output above is from Jetpack r35.3.1.
I also tested on Jetpack r35.3.1 just now, but same behavior.

Hi,
This probably needs other users to share experience. Looks like gcc-11 is not installed in default release:

$ ls /usr/bin/gcc*
/usr/bin/gcc    /usr/bin/gcc-ar    /usr/bin/gcc-nm    /usr/bin/gcc-ranlib
/usr/bin/gcc-8  /usr/bin/gcc-ar-8  /usr/bin/gcc-nm-8  /usr/bin/gcc-ranlib-8
/usr/bin/gcc-9  /usr/bin/gcc-ar-9  /usr/bin/gcc-nm-9  /usr/bin/gcc-ranlib-9

It may not be well supported if you install it manually. Would see if other users have tried gcc-11 and can share experience.