public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Joseph Myers <joseph@codesourcery.com>
Cc: libc-alpha@sourceware.org
Subject: [PATCH] x86: tst-cpu-features-supports.c: Update AMX check
Date: Wed, 21 Apr 2021 18:43:35 -0700	[thread overview]
Message-ID: <CAMe9rOoaV1vPMwxnULzOTQx2A54ixPgkoL5e62+TLn8_Ae5GqQ@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2104212049390.368224@digraph.polyomino.org.uk>

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

On Wed, Apr 21, 2021 at 3:45 PM Joseph Myers <joseph@codesourcery.com> wrote:
>
> With GCC mainline, I'm seeing glibc testsuite build failures for x86_64
> and x86:
>
> ../sysdeps/x86/tst-cpu-features-supports.c: In function 'do_test':
> ../sysdeps/x86/tst-cpu-features-supports.c:62:3: error: parameter to builtin not valid: amx_bf16
>    62 |   fails += CHECK_SUPPORTS (amx_bf16, AMX_BF16);
>       |   ^~~~~
> ../sysdeps/x86/tst-cpu-features-supports.c:63:3: error: parameter to builtin not valid: amx_int8
>    63 |   fails += CHECK_SUPPORTS (amx_int8, AMX_INT8);
>       |   ^~~~~
> ../sysdeps/x86/tst-cpu-features-supports.c:64:3: error: parameter to builtin not valid: amx_tile
>    64 |   fails += CHECK_SUPPORTS (amx_tile, AMX_TILE);
>       |   ^~~~~
>
> https://sourceware.org/pipermail/libc-testresults/2021q2/007827.html
>
> The code in question is inside a conditional
>
> #if __GNUC_PREREQ (11, 1)
>
> so wasn't compiled until the GCC version number was increased to 12 (and
> would probably start failing with GCC 11 branch as soon as 11.1 is
> released).
>

Try this.

-- 
H.J.

[-- Attachment #2: 0001-x86-tst-cpu-features-supports.c-Update-AMX-check.patch --]
[-- Type: text/x-patch, Size: 1195 bytes --]

From 023f78e474f844068a9fb615976ea59a1437877f Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Wed, 21 Apr 2021 18:40:08 -0700
Subject: [PATCH] x86: tst-cpu-features-supports.c: Update AMX check

Pass "amx-bf16", "amx-int8" and "amx-tile", instead of "amx_bf16",
"amx_int8" and "amx_tile", to __builtin_cpu_supports for GCC 11.
---
 sysdeps/x86/tst-cpu-features-supports.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sysdeps/x86/tst-cpu-features-supports.c b/sysdeps/x86/tst-cpu-features-supports.c
index ce78a7d8bc..a2cabc90be 100644
--- a/sysdeps/x86/tst-cpu-features-supports.c
+++ b/sysdeps/x86/tst-cpu-features-supports.c
@@ -59,9 +59,9 @@ do_test (int argc, char **argv)
   fails += CHECK_SUPPORTS (aes, AES);
 #endif
 #if __GNUC_PREREQ (11, 1)
-  fails += CHECK_SUPPORTS (amx_bf16, AMX_BF16);
-  fails += CHECK_SUPPORTS (amx_int8, AMX_INT8);
-  fails += CHECK_SUPPORTS (amx_tile, AMX_TILE);
+  fails += CHECK_SUPPORTS (amx-bf16, AMX_BF16);
+  fails += CHECK_SUPPORTS (amx-int8, AMX_INT8);
+  fails += CHECK_SUPPORTS (amx-tile, AMX_TILE);
 #endif
   fails += CHECK_SUPPORTS (avx, AVX);
   fails += CHECK_SUPPORTS (avx2, AVX2);
-- 
2.30.2


  reply	other threads:[~2021-04-22  1:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21 20:52 tst-cpu-features-supports.c build failures Joseph Myers
2021-04-22  1:43 ` H.J. Lu [this message]
2021-04-22 17:07   ` [PATCH] x86: tst-cpu-features-supports.c: Update AMX check Joseph Myers
2021-04-22 17:08     ` H.J. Lu

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=CAMe9rOoaV1vPMwxnULzOTQx2A54ixPgkoL5e62+TLn8_Ae5GqQ@mail.gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).