DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Stokes, Ian" <ian.stokes@intel.com>
To: "Richardson, Bruce" <bruce.richardson@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "Richardson, Bruce" <bruce.richardson@intel.com>
Subject: RE: [PATCH] build: allow disabling avx512 support via compiler flag
Date: Tue, 11 Feb 2025 17:02:19 +0000	[thread overview]
Message-ID: <MW6PR11MB83091D62D1060A738AA514E192FD2@MW6PR11MB8309.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20250121164114.2311086-1-bruce.richardson@intel.com>

> DPDK build checks for build support for various instruction sets by
> checking both the target machine and the compiler for support. However,
> any disabling of instruction sets via compiler flags was not taken into
> account in many cases. For AVX512 support, check for a user-specified
> "no-avx512f" flag in the c_args parameter before checking if the
> compiler can actually build AVX512 code.
> 
> As well as providing an option for the user, this can be used to test
> builds without AVX512 without having to use an older compiler.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  config/x86/meson.build | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/config/x86/meson.build b/config/x86/meson.build
> index 5455bb0210..47a5b0c04a 100644
> --- a/config/x86/meson.build
> +++ b/config/x86/meson.build
> @@ -17,7 +17,8 @@ endif
>  cc_avx512_flags = ['-mavx512f', '-mavx512vl', '-mavx512dq', '-mavx512bw']
>  cc_has_avx512 = false
>  target_has_avx512 = false
> -if binutils_ok and cc.has_multi_arguments(cc_avx512_flags)
> +if (binutils_ok and cc.has_multi_arguments(cc_avx512_flags)
> +        and '-mno-avx512f' not in get_option('c_args'))
>      # check if compiler is working with _mm512_extracti64x4_epi64
>      # Ref: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82887
>      code = '''#include <immintrin.h>
> --
> 2.43.0

Thanks Bruce,

tested ok for me, LGTM.

Acked-by: Ian Stokes <ian.stokes@intel.com>


      reply	other threads:[~2025-02-11 17:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-21 16:41 Bruce Richardson
2025-02-11 17:02 ` Stokes, Ian [this message]

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=MW6PR11MB83091D62D1060A738AA514E192FD2@MW6PR11MB8309.namprd11.prod.outlook.com \
    --to=ian.stokes@intel.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).