DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Varghese, Vipin" <Vipin.Varghese@amd.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "Song, Keesang" <Keesang.Song@amd.com>
Subject: RE: [PATCH v4] build: reduce use of AVX compiler flags
Date: Tue, 10 Jun 2025 14:52:24 +0000	[thread overview]
Message-ID: <PH7PR12MB85968037EC67A1CDD36F336B826AA@PH7PR12MB8596.namprd12.prod.outlook.com> (raw)
In-Reply-To: <aEhA3YgjW9SsMfYE@bricha3-mobl1.ger.corp.intel.com>

[Public]

Snipped

> >
> > In above log I get `2 instances of march`; logs `-march=native -mrtm
> > -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-
> truncation -Wno-address-of-packed-member -
> DRTE_LOG_DEFAULT_LOGTYPE=pmd.net.i40e -DCC_AVX512_SUPPORT -
> march=skylake-avx512`.
> >
> > Question-1: I think this is not expected right? The `-march=native` is populated
> from `cflags` and `-march= skylake-avx512` is populated from ` cc_avx512_flags`.
>
> The above command is correct. So long as the compiler supports AVX-512 we will
> always compile the AVX-512 code paths for runtime selection. In practice, all
> supported compilers have AVX-512 support, so in reality we have the two scenarios
> you tested:
>
> * The target architecture e.g. znver3 in your case, doesn't support avx512,
>   so the meson.build file adds on the necessary flags to add this support,
>   i.e. that file is compiled with -march=skylake=avx512, which is the
>   minimum ISA that gives you the necessary support.
> * The target architecture, e.g. znver4, does support AVX-512, then no
>   additional flags are added and the files are compiled "as normal"
>
> In both these cases, whether the target architecture is specified as "native" or
> explicitly makes no difference.

So, for files which needs avx512 support like acl_avx512, fib_tire_avx512 and others, we then only pass `cc_avx512_flags`.
All other cases this is ignored. Thank you that makes sense.

>
> > Question-2: if the target is meet minimal ISA why not we use `-march=x86-64-
> v4`?
> >
>
> Good point, that would indeed be better. I'm just not sure whether it is supported
> widely enough on our compilers. Do you know what gcc and clang versions support
> that target?

As I recollect we have been using `x86-64-v4` this from gcc 12.3 and clang-14.
I am not sure if the older versions supports `avx512 that is x86-64-v4`

>
> > Note: I am yet to check for cross build. Will update on cross build how this comes
> out.

Shall we skip the check in cross build?

> >
> >
> >
> > >
> > > Regards,
> > > /Bruce

  reply	other threads:[~2025-06-10 14:52 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-25 17:22 [RFC PATCH] " Bruce Richardson
2025-03-26 16:21 ` Bruce Richardson
2025-03-26 18:06   ` Morten Brørup
2025-03-26 19:20     ` Stephen Hemminger
2025-03-27  7:55       ` DPDK compilers and RHEL 7 support Morten Brørup
2025-03-27 11:11         ` Kevin Traynor
2025-04-09  9:53       ` [RFC PATCH] build: reduce use of AVX compiler flags Varghese, Vipin
2025-04-09 11:31         ` Bruce Richardson
2025-04-10  3:49           ` Varghese, Vipin
2025-05-27 16:24 ` [PATCH v2] " Bruce Richardson
2025-05-29 10:01   ` Bruce Richardson
2025-05-29 10:33   ` Bruce Richardson
2025-05-29 10:31 ` [PATCH v3] " Bruce Richardson
2025-05-29 15:42 ` [PATCH v4] " Bruce Richardson
2025-05-30  9:30   ` Bruce Richardson
2025-06-09  6:02   ` Varghese, Vipin
2025-06-09  7:57     ` Bruce Richardson
2025-06-09 11:59       ` Varghese, Vipin
2025-06-09 12:23         ` Bruce Richardson
2025-06-09 12:32           ` Bruce Richardson
2025-06-10 13:02             ` Varghese, Vipin
2025-06-10 14:27               ` Bruce Richardson
2025-06-10 14:52                 ` Varghese, Vipin [this message]
2025-06-10 15:06                   ` Bruce Richardson
2025-06-11  1:24                     ` Varghese, Vipin
2025-06-11 10:53 ` [PATCH v5] " Bruce Richardson
2025-06-12  9:55   ` Varghese, Vipin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PH7PR12MB85968037EC67A1CDD36F336B826AA@PH7PR12MB8596.namprd12.prod.outlook.com \
    --to=vipin.varghese@amd.com \
    --cc=Keesang.Song@amd.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).