View Single Post
2020-10-27, 19:27   #8
ewmayer
2ω=0

Sep 2002
República de California

2×5,791 Posts

Quote:
 Originally Posted by Artoria2e5 The current README has this to say about determining the SIMD build mode on Macs: This actually does not work at all since Apple now only tells you it's a "6-core Intel i7 CPU". The correct way to do it, which does not involve wikipedia, is by querying one of the following on the terminal: Code: \$ sysctl hw.optional [snip]
A good suggestion, thanks. The README has been updated.
Quote:
 Originally Posted by retina IMO the only true-and-correctTM method of finding out what one's system can execute is to simply execute an instruction from the set. If you get an exception then you can't use that set. This it because it isn't just the CPU you are testing for, it is also the OS.
...and the compiler and assembler one is using under said OS. IIRC when George was first beginning to play with the then-new avx-512 instruction set, he found that MASM had no support for it. I had no such trouble with the latest stable version of gcc/as under Linux of the "GIMPS KNL", but found that the accompanying version of gdb did not properly support display of the avx-512 registers, so we needed to go to a newer unstable-branch gdb.

Anyhow, the OP-post stuff is all about quickly getting a builder/user to "which instructions should be supported on my CPU?", building with the associated inline-asm selected, then seeing if the resulting binary runs properly.