* [patch] nvptx.opt: Add sm_89 and sm_90a to -march-map=
@ 2024-01-20 9:57 Tobias Burnus
2024-01-29 11:59 ` Thomas Schwinge
0 siblings, 1 reply; 2+ messages in thread
From: Tobias Burnus @ 2024-01-20 9:57 UTC (permalink / raw)
To: gcc-patches, Thomas Schwinge, Tom de Vries
[-- Attachment #1: Type: text/plain, Size: 573 bytes --]
Stumbled over this as we recently got a sm_89 card.
-march-map= is mostly a future proof method for user to ensure to use
always the best code gen for a specific card - without needing to know
which GCC version added support for what --march=sm_... (or -misa=sm_...
- those are aliases).
sm_89 was added in CUDA 11.8 (ptx isa 7.8) and sm_90a in CUDA 12.0 (ptx
isa 8.0) but that's just FYI as -march-map=sm_xx, xx >= 80 is mapping to
-march=sm_80 and implies -mptx=7.0 (i.e. ptx isa 7.0, added in CUDA
11.0); hence, any CUDA 11.0+ will do.
OK for mainline?
Tobias
[-- Attachment #2: nvptx-map-arch.diff --]
[-- Type: text/x-patch, Size: 974 bytes --]
nvptx.opt: Add sm_89 and sm_90a to -march-map=
The -march-map= options maps the compute capability to the closest
lower compute capability that has been implemented; for sm_89 and
sm_90a, that were previously missing, that's currently -march=sm_80
alias -misa=sm_80.
gcc/ChangeLog:
* config/nvptx/nvptx.opt (march-map=): Add sm_89 and sm_90a.
Signed-off-by: Tobias Burnus <tburnus@baylibre.com>
diff --git a/gcc/config/nvptx/nvptx.opt b/gcc/config/nvptx/nvptx.opt
index 09d75fca037..deb006663d7 100644
--- a/gcc/config/nvptx/nvptx.opt
+++ b/gcc/config/nvptx/nvptx.opt
@@ -108,9 +108,15 @@ Target RejectNegative Alias(misa=,sm_80)
march-map=sm_87
Target RejectNegative Alias(misa=,sm_80)
+march-map=sm_89
+Target RejectNegative Alias(misa=,sm_80)
+
march-map=sm_90
Target RejectNegative Alias(misa=,sm_80)
+march-map=sm_90a
+Target RejectNegative Alias(misa=,sm_80)
+
Enum
Name(ptx_version) Type(int)
Known PTX ISA versions (for use with the -mptx= option):
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] nvptx.opt: Add sm_89 and sm_90a to -march-map=
2024-01-20 9:57 [patch] nvptx.opt: Add sm_89 and sm_90a to -march-map= Tobias Burnus
@ 2024-01-29 11:59 ` Thomas Schwinge
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Schwinge @ 2024-01-29 11:59 UTC (permalink / raw)
To: Tobias Burnus; +Cc: gcc-patches, Tom de Vries
Hi Tobias!
On 2024-01-20T10:57:29+0100, Tobias Burnus <tburnus@baylibre.com> wrote:
> Stumbled over this as we recently got a sm_89 card.
>
> -march-map= is mostly a future proof method for user to ensure to use
> always the best code gen for a specific card - without needing to know
> which GCC version added support for what --march=sm_... (or -misa=sm_...
> - those are aliases).
>
> sm_89 was added in CUDA 11.8 (ptx isa 7.8) and sm_90a in CUDA 12.0 (ptx
> isa 8.0) but that's just FYI as -march-map=sm_xx, xx >= 80 is mapping to
> -march=sm_80 and implies -mptx=7.0 (i.e. ptx isa 7.0, added in CUDA
> 11.0); hence, any CUDA 11.0+ will do.
>
> OK for mainline?
OK, thanks.
Grüße
Thomas
> nvptx.opt: Add sm_89 and sm_90a to -march-map=
>
> The -march-map= options maps the compute capability to the closest
> lower compute capability that has been implemented; for sm_89 and
> sm_90a, that were previously missing, that's currently -march=sm_80
> alias -misa=sm_80.
>
> gcc/ChangeLog:
>
> * config/nvptx/nvptx.opt (march-map=): Add sm_89 and sm_90a.
>
> Signed-off-by: Tobias Burnus <tburnus@baylibre.com>
>
> diff --git a/gcc/config/nvptx/nvptx.opt b/gcc/config/nvptx/nvptx.opt
> index 09d75fca037..deb006663d7 100644
> --- a/gcc/config/nvptx/nvptx.opt
> +++ b/gcc/config/nvptx/nvptx.opt
> @@ -108,9 +108,15 @@ Target RejectNegative Alias(misa=,sm_80)
> march-map=sm_87
> Target RejectNegative Alias(misa=,sm_80)
>
> +march-map=sm_89
> +Target RejectNegative Alias(misa=,sm_80)
> +
> march-map=sm_90
> Target RejectNegative Alias(misa=,sm_80)
>
> +march-map=sm_90a
> +Target RejectNegative Alias(misa=,sm_80)
> +
> Enum
> Name(ptx_version) Type(int)
> Known PTX ISA versions (for use with the -mptx= option):
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-29 11:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-20 9:57 [patch] nvptx.opt: Add sm_89 and sm_90a to -march-map= Tobias Burnus
2024-01-29 11:59 ` Thomas Schwinge
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).