The .NET and Visual Studio compilers don't really care AFAIK since I have experimented with this before and the assembly that it spits out is the same no matter what. In the case of ICC and GCC there are certain callpaths that must be differentiated for AMD and for Intel (very specific things) which you probably shouldn't worry about to begin with. GCC not as much as ICC (Intel C Compiler) which will attempt to optimize with a lot of SSE and branch prediction hints on Intel but leave some out on AMD which may not support certain features.
There are also libraries out there that rely on specific architecture types such as Intel or AMD but they are very specialized (and I have only seen them used in research purposes) such as very complicated floating point parallel libraries and complex threading libraries.
就 MKL 这样的库而言,主机仍然不会影响编译哪个版本的 MKL。一般来说,MKL 的多个代码路径都会被放入二进制文件中,并且 CPU 调度是在运行时完成的。
It depends on how you configure it. I think by default, no it doesn't matter.
If you're using the Intel Compiler and you compile with /QxHost or /fast, then it will matter since it clearly looks at your system to see what it's capable of.
But if you specify /arch:XXX or whatever option, it will be independent of your machine. For GCC, I think by default it doesn't look at the host machine.
EDIT:
As as far as libraries like MKL go, the host machine will still have no effect on which version of the MKL is compiled. In general multiple code-paths of the MKL are put into the binary regardless and the CPU-dispatching is done at run-time.
没关系。从软件角度来看,AMD 和 Intel 是相同的芯片:基于 x86 的 CPU。是的,它们可以有不同的扩展指令集。但对于不同代的英特尔 CPU 也可以这样说。 Visual Studio 编译器将在所有这些上运行并生成相同的代码。
It doesn't matter. From the software point of view AMD and Intel are the same chips: x86-based CPUs. Yes, they can have different extended instruction sets. But the same you can say about Intel CPUs belonging to the different generations. Visual Studio compiler will run on all of them and produce the same code.
发布评论
评论(3)
.NET 和 Visual Studio 编译器并不真正关心 AFAIK,因为我之前已经尝试过这个,并且无论如何它吐出的程序集都是相同的。对于 ICC 和 GCC,AMD 和 Intel 必须区分某些调用路径(非常具体的事情),您可能一开始就不必担心。 GCC 不像 ICC(Intel C 编译器)那样多,ICC 会尝试在 Intel 上使用大量 SSE 和分支预测提示进行优化,但会在 AMD 上留下一些提示,因为 AMD 可能不支持某些功能。
还有一些库依赖于特定的架构类型,例如 Intel 或 AMD,但它们非常专业(而且我只看到它们用于研究目的),例如非常复杂的浮点并行库和复杂的线程库。
The .NET and Visual Studio compilers don't really care AFAIK since I have experimented with this before and the assembly that it spits out is the same no matter what. In the case of ICC and GCC there are certain callpaths that must be differentiated for AMD and for Intel (very specific things) which you probably shouldn't worry about to begin with. GCC not as much as ICC (Intel C Compiler) which will attempt to optimize with a lot of SSE and branch prediction hints on Intel but leave some out on AMD which may not support certain features.
There are also libraries out there that rely on specific architecture types such as Intel or AMD but they are very specialized (and I have only seen them used in research purposes) such as very complicated floating point parallel libraries and complex threading libraries.
这取决于您如何配置它。我认为默认情况下,不,没关系。
如果您使用英特尔编译器并使用
/QxHost
或/fast
进行编译,那么这很重要,因为它会清楚地查看您的系统以了解其功能。但如果您指定
/arch:XXX
或任何选项,它将独立于您的计算机。对于 GCC,我认为默认情况下它不会查看主机。编辑:
就 MKL 这样的库而言,主机仍然不会影响编译哪个版本的 MKL。一般来说,MKL 的多个代码路径都会被放入二进制文件中,并且 CPU 调度是在运行时完成的。
It depends on how you configure it. I think by default, no it doesn't matter.
If you're using the Intel Compiler and you compile with
/QxHost
or/fast
, then it will matter since it clearly looks at your system to see what it's capable of.But if you specify
/arch:XXX
or whatever option, it will be independent of your machine. For GCC, I think by default it doesn't look at the host machine.EDIT:
As as far as libraries like MKL go, the host machine will still have no effect on which version of the MKL is compiled. In general multiple code-paths of the MKL are put into the binary regardless and the CPU-dispatching is done at run-time.
没关系。从软件角度来看,AMD 和 Intel 是相同的芯片:基于 x86 的 CPU。是的,它们可以有不同的扩展指令集。但对于不同代的英特尔 CPU 也可以这样说。 Visual Studio 编译器将在所有这些上运行并生成相同的代码。
It doesn't matter. From the software point of view AMD and Intel are the same chips: x86-based CPUs. Yes, they can have different extended instruction sets. But the same you can say about Intel CPUs belonging to the different generations. Visual Studio compiler will run on all of them and produce the same code.