DPDK patches and discussions
 help / color / mirror / Atom feed
* Cross-Compiling x86_64 but for different CPU
@ 2024-12-31  8:45 Zaid M
  2025-01-05 23:56 ` Dmitry Kozlyuk
  0 siblings, 1 reply; 2+ messages in thread
From: Zaid M @ 2024-12-31  8:45 UTC (permalink / raw)
  To: dev

[-- Attachment #1: Type: text/plain, Size: 222 bytes --]

I have an Intel CPU but I want to compile an optimized binary for AMD
(x86_64) which may have a different CPU instruction set (e.g. avx512 or
avx512bw) and I don't want to use "-Dplatform=generic". How can I achieve
that?

[-- Attachment #2: Type: text/html, Size: 259 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Cross-Compiling x86_64 but for different CPU
  2024-12-31  8:45 Cross-Compiling x86_64 but for different CPU Zaid M
@ 2025-01-05 23:56 ` Dmitry Kozlyuk
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Kozlyuk @ 2025-01-05 23:56 UTC (permalink / raw)
  To: Zaid M; +Cc: dev

2024-12-31 11:45 (UTC+0300), Zaid M:
> I have an Intel CPU but I want to compile an optimized binary for AMD
> (x86_64) which may have a different CPU instruction set (e.g. avx512 or
> avx512bw) and I don't want to use "-Dplatform=generic". How can I achieve
> that?

When you use `-Dplatform=generic`, parts of DPDK vectorized for e.g. AVX512
are still built, and DPDK will employ them if run on a CPU that supports them.
Usually this is enough because fast-path routines have vectorized versions
and the performance of other code is not critical, but not always.
If you know that the host machine (AMD) has e.g. Zen3 instruction set,
you can use `-Dcpu_instruction_set=zen3` to optimize the rest of DPDK code.
This will make the build non-portable to machines without Zen3 though.

P.S. Questions about DPDK usage belong to users@dpdk.org.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-05 23:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-31  8:45 Cross-Compiling x86_64 but for different CPU Zaid M
2025-01-05 23:56 ` Dmitry Kozlyuk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).