Gcc -mcpu / -mtune for "Carmel" CPU?

Dear Experts,

Does anyone know what the appropriate setting to pass to gcc’s -mcpu or -mtune optioon is for the Carmel CPUs in the NX?

There doesn’t seem to be specific support for this CPU in gcc. From what I know about the microarchitecture it’s a rather unusual design and it’s not obvious which of the Coretex options it is most similar to.

Thanks, Phil.

I think you can using the system tools taskset to have your process assign to the cpu cores which you want.

That’s not what gcc -mcpu and -mtune do.


The Carmel cores emulates the ARM Architecture version 8.2, executing both 64-bit AArch64 code, and 32-bit AArch32 code.

Further inputs :
The most important things are the -march flags corresponding to the processor capabilities (something like -march=armv8.2-a+fp16+simd+crypto+predres), turning on appropriate levels of optimization (-O2 in general, -O3 for very hot loops), using -ffast-math where possible, and having the latest Jetpack release. We also see better performance with newer compiler revisions and recompiling some base libraries to better use the available processor features (especially v8.1 LSE atomics).

In terms of scheduling (-mtune), cortex-a75 and cortex-a76 should both be good starting points, as should -mtune=generic-armv8.2-a. The processor dynamic code optimization can compensate for some shortcomings in the scheduling and selection of instructions, so we believe this should be secondary or tertiary in most cases.

If you have questions about the performance of code sequences that you can share, we would be happy to provide some further help or analysis.