From: Tobias Burnus <tburnus@baylibre.com>
To: gcc-patches <gcc-patches@gcc.gnu.org>,
Thomas Schwinge <tschwinge@baylibre.com>,
Tom de Vries <tdevries@suse.de>
Subject: [patch] nvptx.opt: Add sm_89 and sm_90a to -march-map=
Date: Sat, 20 Jan 2024 10:57:29 +0100 [thread overview]
Message-ID: <94930db9-831d-432c-9d3a-337dba678f09@baylibre.com> (raw)
[-- 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):
next reply other threads:[~2024-01-20 9:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-20 9:57 Tobias Burnus [this message]
2024-01-29 11:59 ` Thomas Schwinge
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=94930db9-831d-432c-9d3a-337dba678f09@baylibre.com \
--to=tburnus@baylibre.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=tdevries@suse.de \
--cc=tschwinge@baylibre.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).