我如何知道哪些 AVX C 函数在不同的处理器型号上可用

How do I know which AVX C functions are available on different processor models

基本上是标题。例如,我正在尝试 运行 指令,例如:

_mm256_load_pd_mm256_add_pd_mm256_stream_pd 和处理器上的 128 位版本:Intel Xeon、E5630、2.53 GHz、IBM HS22。但是我 Illegal instruction 想知道有什么网站可以让我看到这个处理器有哪些功能吗?

检查你的 /proc/cpuinfo 如果你在 OS 上有一个。

或使用 clang 或 gcc -march=native - 他们将拒绝编译您 CPU 不支持的任何内在函数。 (与 MSVC 或 ICC 不同,它们允许您使用内在函数而不告诉它目标机器支持它们。)


要按 CPU 模型查找,google 模型,例如Xeon, E5630 -> https://ark.intel.com/content/www/us/en/ark/products/47924/intel-xeon-processor-e5630-12m-cache-2-53-ghz-5-86-gt-s-intel-qpi.html

  • 指令集扩展:Intel® SSE4.2

所以根本没有 AVX,因为它是 2010 年的 Westmere-EP 微架构(在 Sandybridge 之前。)

有关 CPU 的更多详细信息,您还可以通过您感兴趣的任何扩展名(例如 cmpxchg16b 或英特尔方舟页面不会提及的 FSGSBASE 检查 http://instlatx64.atw.hu/ and check the CPUID dump for that model (or one of the same microarchitecture), if you can find one. e.g. a screenshot of Aida64 CPUID running on a Westmere-EX, and instruction latency/throughput benchmark output, with info at the top of the text file including decoded CPUID info showing which ISA extensions it has. Also raw CPUID dumps which you can cross-reference with the CPUID feature-bit required (https://sandpile.org/x86/cpuid.htm) .).


相关:https://software.intel.com/sites/landingpage/IntrinsicsGuide/告诉你每个内在的相应asm指令需要什么ISA扩展。