From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: Chaeyong Chong <cychong@gmail.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
Chaeyong Chong <cychong@samsung.com>,
"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] mk: Detect AVX2 capability based on the target CPU architecture
Date: Sun, 22 Jul 2018 09:19:02 +0000 [thread overview]
Message-ID: <2601191342CEEE43887BDE71AB977258DF51920C@irsmsx105.ger.corp.intel.com> (raw)
In-Reply-To: <20180721145342.6503-1-cychong@gmail.com>
> -----Original Message-----
> From: Chaeyong Chong [mailto:cychong@gmail.com]
> Sent: Saturday, July 21, 2018 3:54 PM
> To: Ananyev, Konstantin <konstantin.ananyev@intel.com>
> Cc: dev@dpdk.org; Chaeyong Chong <cychong@samsung.com>; stable@dpdk.org
> Subject: [PATCH] mk: Detect AVX2 capability based on the target CPU architecture
>
> From: Chaeyong Chong <cychong@samsung.com>
>
> AVX2 support check should be based on the target CPU architecure.
> For this, -march option should be $(RTE_MACHINE) instead of core-avx2.
I don't really think it should.
The purpose is to build an AVX2 function even for 'default' target.
Then at runtime proper version of the code (SSE/AVX2/etc) could be selected.
So NACK.
Konstantin
>
> Cc: stable@dpdk.org
>
> Signed-off-by: Chaeyong Chong <cychong@samsung.com>
> ---
> lib/librte_acl/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/librte_acl/Makefile b/lib/librte_acl/Makefile
> index ea5edf00a..c756eaeb2 100644
> --- a/lib/librte_acl/Makefile
> +++ b/lib/librte_acl/Makefile
> @@ -44,7 +44,7 @@ ifeq ($(findstring RTE_MACHINE_CPUFLAG_AVX2,$(CFLAGS)),RTE_MACHINE_CPUFLAG_AVX2)
> CC_AVX2_SUPPORT=1
> else
> CC_AVX2_SUPPORT=\
> - $(shell $(CC) -march=core-avx2 -dM -E - </dev/null 2>&1 | \
> + $(shell $(CC) -march=$(RTE_MACHINE) -dM -E - </dev/null 2>&1 | \
> grep -q AVX2 && echo 1)
> ifeq ($(CC_AVX2_SUPPORT), 1)
> ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
> --
> 2.18.0
parent reply other threads:[~2018-07-22 9:20 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20180721145342.6503-1-cychong@gmail.com>]
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=2601191342CEEE43887BDE71AB977258DF51920C@irsmsx105.ger.corp.intel.com \
--to=konstantin.ananyev@intel.com \
--cc=cychong@gmail.com \
--cc=cychong@samsung.com \
--cc=dev@dpdk.org \
--cc=stable@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).