public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Hongtao Liu <crazylht@gmail.com>
To: Haochen Jiang <haochen.jiang@intel.com>
Cc: gcc-patches@gcc.gnu.org, ubizjak@gmail.com, hongtao.liu@intel.com
Subject: Re: [PATCH] i386: Add AMX-TILE dependency for AMX related ISAs
Date: Mon, 14 Nov 2022 13:49:13 +0800	[thread overview]
Message-ID: <CAMZc-bzfrca6i-H+JomiN5TF22m+dhay16f7ifBdnsGsF5c4Rg@mail.gmail.com> (raw)
In-Reply-To: <20221111024330.87663-1-haochen.jiang@intel.com>

On Fri, Nov 11, 2022 at 10:45 AM Haochen Jiang via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> Hi all,
>
> For all AMX related ISAs, we have a potential dependency on AMX-TILE
> or we even won't have the basic support on AMX.
>
> This patch added those dependency. Ok for trunk?
Ok.
>
> BRs,
> Haochen
>
> gcc/ChangeLog:
>
>         * common/config/i386/i386-common.cc
>         (OPTION_MASK_ISA2_AMX_INT8_SET): Add AMX-TILE dependency.
>         (OPTION_MASK_ISA2_AMX_BF16_SET): Ditto.
>         (OPTION_MASK_ISA2_AMX_FP16_SET): Ditto.
>         (OPTION_MASK_ISA2_AMX_TILE_UNSET): Disable AMX_{INT8,
>         BF16, FP16} when disable AMX_TILE.
>
> gcc/testsuite/ChangeLog:
>
>         * gcc.target/i386/amxbf16-dpbf16ps-2.c: Remove -amx-tile.
>         * gcc.target/i386/amxfp16-dpfp16ps-2.c: Ditto.
>         * gcc.target/i386/amxint8-dpbssd-2.c: Ditto.
>         * gcc.target/i386/amxint8-dpbsud-2.c: Ditto.
>         * gcc.target/i386/amxint8-dpbusd-2.c: Ditto.
>         * gcc.target/i386/amxint8-dpbuud-2.c: Ditto.
> ---
>  gcc/common/config/i386/i386-common.cc              | 13 +++++++++----
>  gcc/testsuite/gcc.target/i386/amxbf16-dpbf16ps-2.c |  3 +--
>  gcc/testsuite/gcc.target/i386/amxfp16-dpfp16ps-2.c |  3 +--
>  gcc/testsuite/gcc.target/i386/amxint8-dpbssd-2.c   |  3 +--
>  gcc/testsuite/gcc.target/i386/amxint8-dpbsud-2.c   |  3 +--
>  gcc/testsuite/gcc.target/i386/amxint8-dpbusd-2.c   |  3 +--
>  gcc/testsuite/gcc.target/i386/amxint8-dpbuud-2.c   |  3 +--
>  7 files changed, 15 insertions(+), 16 deletions(-)
>
> diff --git a/gcc/common/config/i386/i386-common.cc b/gcc/common/config/i386/i386-common.cc
> index 431fd0d3ad1..5e6d3da0306 100644
> --- a/gcc/common/config/i386/i386-common.cc
> +++ b/gcc/common/config/i386/i386-common.cc
> @@ -106,12 +106,15 @@ along with GCC; see the file COPYING3.  If not see
>  #define OPTION_MASK_ISA_CLWB_SET OPTION_MASK_ISA_CLWB
>  #define OPTION_MASK_ISA2_AVX512VP2INTERSECT_SET OPTION_MASK_ISA2_AVX512VP2INTERSECT
>  #define OPTION_MASK_ISA2_AMX_TILE_SET OPTION_MASK_ISA2_AMX_TILE
> -#define OPTION_MASK_ISA2_AMX_INT8_SET OPTION_MASK_ISA2_AMX_INT8
> -#define OPTION_MASK_ISA2_AMX_BF16_SET OPTION_MASK_ISA2_AMX_BF16
> +#define OPTION_MASK_ISA2_AMX_INT8_SET \
> +  (OPTION_MASK_ISA2_AMX_TILE | OPTION_MASK_ISA2_AMX_INT8)
> +#define OPTION_MASK_ISA2_AMX_BF16_SET \
> +  (OPTION_MASK_ISA2_AMX_TILE | OPTION_MASK_ISA2_AMX_BF16)
>  #define OPTION_MASK_ISA2_AVXVNNIINT8_SET OPTION_MASK_ISA2_AVXVNNIINT8
>  #define OPTION_MASK_ISA2_AVXNECONVERT_SET OPTION_MASK_ISA2_AVXNECONVERT
>  #define OPTION_MASK_ISA2_CMPCCXADD_SET OPTION_MASK_ISA2_CMPCCXADD
> -#define OPTION_MASK_ISA2_AMX_FP16_SET OPTION_MASK_ISA2_AMX_FP16
> +#define OPTION_MASK_ISA2_AMX_FP16_SET \
> +  (OPTION_MASK_ISA2_AMX_TILE | OPTION_MASK_ISA2_AMX_FP16)
>  #define OPTION_MASK_ISA2_PREFETCHI_SET OPTION_MASK_ISA2_PREFETCHI
>  #define OPTION_MASK_ISA2_RAOINT_SET OPTION_MASK_ISA2_RAOINT
>
> @@ -277,7 +280,9 @@ along with GCC; see the file COPYING3.  If not see
>  #define OPTION_MASK_ISA2_SERIALIZE_UNSET OPTION_MASK_ISA2_SERIALIZE
>  #define OPTION_MASK_ISA2_AVX512VP2INTERSECT_UNSET OPTION_MASK_ISA2_AVX512VP2INTERSECT
>  #define OPTION_MASK_ISA2_TSXLDTRK_UNSET OPTION_MASK_ISA2_TSXLDTRK
> -#define OPTION_MASK_ISA2_AMX_TILE_UNSET OPTION_MASK_ISA2_AMX_TILE
> +#define OPTION_MASK_ISA2_AMX_TILE_UNSET \
> +  (OPTION_MASK_ISA2_AMX_TILE | OPTION_MASK_ISA2_AMX_INT8_UNSET \
> +   | OPTION_MASK_ISA2_AMX_BF16_UNSET | OPTION_MASK_ISA2_AMX_FP16_UNSET)
>  #define OPTION_MASK_ISA2_AMX_INT8_UNSET OPTION_MASK_ISA2_AMX_INT8
>  #define OPTION_MASK_ISA2_AMX_BF16_UNSET OPTION_MASK_ISA2_AMX_BF16
>  #define OPTION_MASK_ISA2_UINTR_UNSET OPTION_MASK_ISA2_UINTR
> diff --git a/gcc/testsuite/gcc.target/i386/amxbf16-dpbf16ps-2.c b/gcc/testsuite/gcc.target/i386/amxbf16-dpbf16ps-2.c
> index b00bc13ec78..35881e7682a 100644
> --- a/gcc/testsuite/gcc.target/i386/amxbf16-dpbf16ps-2.c
> +++ b/gcc/testsuite/gcc.target/i386/amxbf16-dpbf16ps-2.c
> @@ -1,7 +1,6 @@
>  /* { dg-do run { target { ! ia32 } } } */
> -/* { dg-require-effective-target amx_tile } */
>  /* { dg-require-effective-target amx_bf16 } */
> -/* { dg-options "-O2 -mamx-tile -mamx-bf16" } */
> +/* { dg-options "-O2 -mamx-bf16" } */
>  #include <immintrin.h>
>
>  #define AMX_BF16
> diff --git a/gcc/testsuite/gcc.target/i386/amxfp16-dpfp16ps-2.c b/gcc/testsuite/gcc.target/i386/amxfp16-dpfp16ps-2.c
> index 2d359a689ea..a1fafbcbfeb 100644
> --- a/gcc/testsuite/gcc.target/i386/amxfp16-dpfp16ps-2.c
> +++ b/gcc/testsuite/gcc.target/i386/amxfp16-dpfp16ps-2.c
> @@ -1,8 +1,7 @@
>  /* { dg-do run { target { ! ia32 } } } */
> -/* { dg-require-effective-target amx_tile } */
>  /* { dg-require-effective-target amx_fp16 } */
>  /* { dg-require-effective-target avx512fp16 } */
> -/* { dg-options "-O2 -mamx-tile -mamx-fp16 -mavx512fp16" } */
> +/* { dg-options "-O2 -mamx-fp16 -mavx512fp16" } */
>  #define AMX_FP16
>  #define DO_TEST test_amx_fp16_dpfp16ps
>  void test_amx_fp16_dpfp16ps ();
> diff --git a/gcc/testsuite/gcc.target/i386/amxint8-dpbssd-2.c b/gcc/testsuite/gcc.target/i386/amxint8-dpbssd-2.c
> index 74ad71be5c5..d7efb3d20c2 100644
> --- a/gcc/testsuite/gcc.target/i386/amxint8-dpbssd-2.c
> +++ b/gcc/testsuite/gcc.target/i386/amxint8-dpbssd-2.c
> @@ -1,7 +1,6 @@
>  /* { dg-do run { target { ! ia32 } } } */
> -/* { dg-require-effective-target amx_tile } */
>  /* { dg-require-effective-target amx_int8 } */
> -/* { dg-options "-O2 -mamx-tile -mamx-int8" } */
> +/* { dg-options "-O2 -mamx-int8" } */
>  #include <immintrin.h>
>
>  #define AMX_INT8
> diff --git a/gcc/testsuite/gcc.target/i386/amxint8-dpbsud-2.c b/gcc/testsuite/gcc.target/i386/amxint8-dpbsud-2.c
> index e7241bdd860..c8bf89d738b 100644
> --- a/gcc/testsuite/gcc.target/i386/amxint8-dpbsud-2.c
> +++ b/gcc/testsuite/gcc.target/i386/amxint8-dpbsud-2.c
> @@ -1,7 +1,6 @@
>  /* { dg-do run { target { ! ia32 } } } */
> -/* { dg-require-effective-target amx_tile } */
>  /* { dg-require-effective-target amx_int8 } */
> -/* { dg-options "-O2 -mamx-tile -mamx-int8" } */
> +/* { dg-options "-O2 -mamx-int8" } */
>  #include <immintrin.h>
>
>  #define AMX_INT8
> diff --git a/gcc/testsuite/gcc.target/i386/amxint8-dpbusd-2.c b/gcc/testsuite/gcc.target/i386/amxint8-dpbusd-2.c
> index f0b9f97aec9..bb8777d920a 100644
> --- a/gcc/testsuite/gcc.target/i386/amxint8-dpbusd-2.c
> +++ b/gcc/testsuite/gcc.target/i386/amxint8-dpbusd-2.c
> @@ -1,7 +1,6 @@
>  /* { dg-do run { target { ! ia32 } } } */
> -/* { dg-require-effective-target amx_tile } */
>  /* { dg-require-effective-target amx_int8 } */
> -/* { dg-options "-O2 -mamx-tile -mamx-int8" } */
> +/* { dg-options "-O2 -mamx-int8" } */
>  #include <immintrin.h>
>
>  #define AMX_INT8
> diff --git a/gcc/testsuite/gcc.target/i386/amxint8-dpbuud-2.c b/gcc/testsuite/gcc.target/i386/amxint8-dpbuud-2.c
> index eb70b2f9259..d30f46d8de3 100644
> --- a/gcc/testsuite/gcc.target/i386/amxint8-dpbuud-2.c
> +++ b/gcc/testsuite/gcc.target/i386/amxint8-dpbuud-2.c
> @@ -1,7 +1,6 @@
>  /* { dg-do run { target { ! ia32 } } } */
> -/* { dg-require-effective-target amx_tile } */
>  /* { dg-require-effective-target amx_int8 } */
> -/* { dg-options "-O2 -mamx-tile -mamx-int8" } */
> +/* { dg-options "-O2 -mamx-int8" } */
>  #include <immintrin.h>
>
>  #define AMX_INT8
> --
> 2.18.1
>


-- 
BR,
Hongtao

      reply	other threads:[~2022-11-14  5:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11  2:43 Haochen Jiang
2022-11-14  5:49 ` Hongtao Liu [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=CAMZc-bzfrca6i-H+JomiN5TF22m+dhay16f7ifBdnsGsF5c4Rg@mail.gmail.com \
    --to=crazylht@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=haochen.jiang@intel.com \
    --cc=hongtao.liu@intel.com \
    --cc=ubizjak@gmail.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).