public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/113288] New: [i386] Missing #define for -mavx10.1-256 and -mavx10.1-512
@ 2024-01-09  7:23 burnus at gcc dot gnu.org
  2024-01-09  7:30 ` [Bug target/113288] " haochen.jiang at intel dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2024-01-09  7:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113288

            Bug ID: 113288
           Summary: [i386] Missing #define for -mavx10.1-256 and
                    -mavx10.1-512
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: haochen.jiang at intel dot com, hongyuw at gcc dot gnu.org
  Target Milestone: ---
            Target: i386,x86_64

As noted in https://gcc.gnu.org/pipermail/gcc-patches/2024-January/642025.html

There is not #define for -mavx10.1-256 and -mavx10.1-512

By contrast, there is one for, e.g.,

__AVX10_512BIT__ and "avx10-max-512bit"
__AVX10_1__ and "avx10.1"
__AMX_FP16__ and -mamx-fp16
etc.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/113288] [i386] Missing #define for -mavx10.1-256 and -mavx10.1-512
  2024-01-09  7:23 [Bug target/113288] New: [i386] Missing #define for -mavx10.1-256 and -mavx10.1-512 burnus at gcc dot gnu.org
@ 2024-01-09  7:30 ` haochen.jiang at intel dot com
  2024-01-09  7:49 ` liuhongt at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: haochen.jiang at intel dot com @ 2024-01-09  7:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113288

--- Comment #1 from Haochen Jiang <haochen.jiang at intel dot com> ---
(In reply to Tobias Burnus from comment #0)
> As noted in
> https://gcc.gnu.org/pipermail/gcc-patches/2024-January/642025.html
> 
> There is not #define for -mavx10.1-256 and -mavx10.1-512
> 
> By contrast, there is one for, e.g.,
> 
> __AVX10_512BIT__ and "avx10-max-512bit"
> __AVX10_1__ and "avx10.1"

I think both of these two are also not on current trunk, they are the previous
design but get obsoleted at the end. Let me see if we need something like that.

> __AMX_FP16__ and -mamx-fp16
> etc.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/113288] [i386] Missing #define for -mavx10.1-256 and -mavx10.1-512
  2024-01-09  7:23 [Bug target/113288] New: [i386] Missing #define for -mavx10.1-256 and -mavx10.1-512 burnus at gcc dot gnu.org
  2024-01-09  7:30 ` [Bug target/113288] " haochen.jiang at intel dot com
@ 2024-01-09  7:49 ` liuhongt at gcc dot gnu.org
  2024-01-09  7:54 ` haochen.jiang at intel dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: liuhongt at gcc dot gnu.org @ 2024-01-09  7:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113288

Hongtao Liu <liuhongt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |liuhongt at gcc dot gnu.org

--- Comment #2 from Hongtao Liu <liuhongt at gcc dot gnu.org> ---
I think we can add #define for -mavx10.1-256 and -mavx10.1-512.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/113288] [i386] Missing #define for -mavx10.1-256 and -mavx10.1-512
  2024-01-09  7:23 [Bug target/113288] New: [i386] Missing #define for -mavx10.1-256 and -mavx10.1-512 burnus at gcc dot gnu.org
  2024-01-09  7:30 ` [Bug target/113288] " haochen.jiang at intel dot com
  2024-01-09  7:49 ` liuhongt at gcc dot gnu.org
@ 2024-01-09  7:54 ` haochen.jiang at intel dot com
  2024-01-09  8:43 ` burnus at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: haochen.jiang at intel dot com @ 2024-01-09  7:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113288

--- Comment #3 from Haochen Jiang <haochen.jiang at intel dot com> ---
Adding them are quite straightforward. But I am not quite sure how the whole
libgomp patch works.

Is the patch attempt to check whether it is a perfect match for each ISA
detected from a hardware? If that is the case, we need them to be added. BTW,
under this scenario, no need to add an if clause for macro __EVEX512__ and
__EVEX256__ in that patch since those two are not true ISAs.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/113288] [i386] Missing #define for -mavx10.1-256 and -mavx10.1-512
  2024-01-09  7:23 [Bug target/113288] New: [i386] Missing #define for -mavx10.1-256 and -mavx10.1-512 burnus at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-01-09  7:54 ` haochen.jiang at intel dot com
@ 2024-01-09  8:43 ` burnus at gcc dot gnu.org
  2024-01-12  7:56 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2024-01-09  8:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113288

--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> ---
The(In reply to Haochen Jiang from comment #3)
> Adding them are quite straightforward.

I guess so. Note: this PR is about the #define in gcc/config/i386, only.

> But I am not quite sure how the whole
> libgomp patch works.

OpenMP has selectors which permits to choose different functions or OpenMap
directives. Several can be evaluated at compile time , some only at runtime.

example (syntax probably not completely right):
 ... match(implementation={arch(x86_64),isa(sse4)})

Here, it can be evaluated at compile time which is done via the function 

TARGET_OMP_DEVICE_KIND_ARCH_ISA

For some, runtime checks are more useful and I am also not sure whether
something like cpuid would make more sense here (in general and especially for
the run-time selector).

But that's a separate issue to this PR.

> Is the patch attempt to check whether it is a perfect match for each ISA
> detected from a hardware? If that is the case, we need them to be added.
> BTW, under this scenario, no need to add an if clause for macro __EVEX512__
> and __EVEX256__ in that patch since those two are not true ISAs.

Something like that. It is also more for completeness and consistency.

For OpenMP we just state:
https://gcc.gnu.org/onlinedocs/libgomp/OpenMP-Context-Selectors.html

which is rather generic for i386/x86_64. We cpuld do less, but the target hook
made it easy to support all of them... I don't think anyone will use
avx10.1-256 as isa context selector with OpenMP.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/113288] [i386] Missing #define for -mavx10.1-256 and -mavx10.1-512
  2024-01-09  7:23 [Bug target/113288] New: [i386] Missing #define for -mavx10.1-256 and -mavx10.1-512 burnus at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-01-09  8:43 ` burnus at gcc dot gnu.org
@ 2024-01-12  7:56 ` cvs-commit at gcc dot gnu.org
  2024-01-12  7:57 ` haochen.jiang at intel dot com
  2024-04-08  8:18 ` liuhongt at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-12  7:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113288

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Haochen Jiang <jianghc@gcc.gnu.org>:

https://gcc.gnu.org/g:4ab847b354ee9e13e6052f78f49f575eae3abf3f

commit r14-7168-g4ab847b354ee9e13e6052f78f49f575eae3abf3f
Author: Haochen Jiang <haochen.jiang@intel.com>
Date:   Wed Jan 10 10:20:37 2024 +0800

    i386: Add AVX10.1 related macros

    gcc/ChangeLog:

            PR target/113288
            * config/i386/i386-c.cc (ix86_target_macros_internal):
            Add __AVX10_1__, __AVX10_1_256__ and __AVX10_1_512__.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/113288] [i386] Missing #define for -mavx10.1-256 and -mavx10.1-512
  2024-01-09  7:23 [Bug target/113288] New: [i386] Missing #define for -mavx10.1-256 and -mavx10.1-512 burnus at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2024-01-12  7:56 ` cvs-commit at gcc dot gnu.org
@ 2024-01-12  7:57 ` haochen.jiang at intel dot com
  2024-04-08  8:18 ` liuhongt at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: haochen.jiang at intel dot com @ 2024-01-12  7:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113288

--- Comment #6 from Haochen Jiang <haochen.jiang at intel dot com> ---
Fixed on trunk.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/113288] [i386] Missing #define for -mavx10.1-256 and -mavx10.1-512
  2024-01-09  7:23 [Bug target/113288] New: [i386] Missing #define for -mavx10.1-256 and -mavx10.1-512 burnus at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2024-01-12  7:57 ` haochen.jiang at intel dot com
@ 2024-04-08  8:18 ` liuhongt at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: liuhongt at gcc dot gnu.org @ 2024-04-08  8:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113288

Hongtao Liu <liuhongt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Hongtao Liu <liuhongt at gcc dot gnu.org> ---
.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-04-08  8:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-09  7:23 [Bug target/113288] New: [i386] Missing #define for -mavx10.1-256 and -mavx10.1-512 burnus at gcc dot gnu.org
2024-01-09  7:30 ` [Bug target/113288] " haochen.jiang at intel dot com
2024-01-09  7:49 ` liuhongt at gcc dot gnu.org
2024-01-09  7:54 ` haochen.jiang at intel dot com
2024-01-09  8:43 ` burnus at gcc dot gnu.org
2024-01-12  7:56 ` cvs-commit at gcc dot gnu.org
2024-01-12  7:57 ` haochen.jiang at intel dot com
2024-04-08  8:18 ` liuhongt at gcc dot gnu.org

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).