Closed fxcoudert closed 11 months ago
At present we have no customisation of the CPU profiles for Apple Arm processors. It is something to add, although I am not 100% clear about what is published.
At least we can use the same set of features that clang does (where those are supported).
However things like scheduling etc. are much more complex - and it is hard to see how to implement them without documentation about the chip characteristics.
Courses of action:
Yes, I think “not erroring out” would already be great.
Note that https://github.com/JuliaLang/julia/pull/44347 changed the flag to -mcpu=apple-m1
.
Related question: what would be a good -mcpu
value at the moment for this CPU? It isn't quite easy to just guess a close enough CPU from https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html
Related question: what would be a good
-mcpu
value at the moment for this CPU? It isn't quite easy to just guess a close enough CPU from https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html
In terms of -march
, in LLVM it's something like -march=armv8.5-a+fullfp16+fp16fml+sha3
. I think the GCC equivalent is something like -march=armv8.5-a+fp16+sha3+crypto+rcpc
.
-mtune
is harder so the safest is probably generic for now.
This:
Sources of information;
Unfortunately, these sources are in conflict; in particular the clang-claimed feature set disagrees with the output of sysctl -a, and the base Arm revs. claimed in some cases miss features that ARM DDI 0487J.a lists as mandatory for the rev.
GCC does not seem to have a scheduler that is similar to the "Cyclone" one in LLVM - so I've guessed to use cortex57 (but, maybe we miss 8-issue, it's not clear - and my experience with the scheduler is ≈ 0).
Thus, the choices here are intended to be conservative.
TODO:
clang supports passing
apple-a12
as a valid CPU choice, probably GCC should align itself with that? Brings trouble in Julia: https://github.com/JuliaLang/julia/issues/44517