AMD 与 Intel 处理器制作可执行文件

发布于 2024-12-04 14:21:21 字数 1431 浏览 1 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

萌面超妹 2024-12-11 14:21:21

.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.

不乱于心 2024-12-11 14:21:21

这取决于您如何配置它。我认为默认情况下,不,没关系。

如果您使用英特尔编译器并使用 /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.

千纸鹤带着心事 2024-12-11 14:21:21

没关系。从软件角度来看,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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文