diff mbox series

nvptx.opt: Add sm_89 and sm_90a to -march-map=

Message ID 94930db9-831d-432c-9d3a-337dba678f09@baylibre.com
State New
Headers show
Series nvptx.opt: Add sm_89 and sm_90a to -march-map= | expand

Commit Message

Tobias Burnus Jan. 20, 2024, 9:57 a.m. UTC
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

Comments

Thomas Schwinge Jan. 29, 2024, 11:59 a.m. UTC | #1
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):
diff mbox series

Patch

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