What does -march=native boil down to? [duplicate]
Asked Answered
B

1

5

Currently we compile and run code on same hardware, so -march=native flag is used.

We are going to keep running on this hardware but compile on different architecture. So I need to replace native with whatever it is equivalent to on current hardware.

Is there a way to get gcc to report what native is equivalent to on particular hardware?

Baseman answered 5/6, 2019 at 21:25 Comment(0)
H
10

Yes, you can run the command

gcc -march=native -Q --help=target

to see the flags applied, including the resolved -march flag.

Housecarl answered 5/6, 2019 at 21:28 Comment(2)
We have Intel Xeon Gold 6148 dual-socket nodes, and gcc -march=native -Q --help=target reported `-march = knl'. This is surprising to me - we don't have any Phi accelerators. Is it expected?Baseman
@Baseman you should ask that as a different questionCryptoanalysis

© 2022 - 2024 — McMap. All rights reserved.