[ was: Re: [wwwdocs][patch] gcc-12/changes.html: Document -misa update
for nvptx ]
On 3/3/22 13:27, Tobias Burnus wrote:
The current wording, https://gcc.gnu.org/gcc-12/changes.html#nvptx ,
is outdated and (now wrongly) encourages to use -mptx=.
Updated as follows.
I've taken these changes as a base, revised and added some more items.
Any comments?
Also, feel free to instead comment on the full-text version below
(copied from firefox after opening the page), that might be more readable.
Thanks,
- Tom
-----------------------------------------------------------------------------
NVPTX
The -march flag has been added. The -misa flag is now considered an
alias of the -march flag.
Support for PTX ISA target architectures sm_53, sm_70, sm_75 and
sm_80 has been added. These can be specified using the -march flag.
The default PTX ISA target architecture has been set back to sm_30,
to fix support for sm_30 boards.
The -march-map flag has been added. The -march-map value will be
mapped to an valid -march flag value. For instance, -march-map=sm_50
maps to -march=sm_35. This can be used to specify that generated code is
to be executed on a board with at least some specific compute
capability, without having to know the valid values for the -march flag.
The -mptx flag has been added to specify the PTX ISA version for
the generated code; permitted values are 3.1 (matches previous GCC
versions), 6.0, 6.3, and 7.0. If not specified, the used version is the
minimal version required for -march but at least 6.0.
An mptx-3.1 multilib was added. This allows using older drivers
which do not support PTX ISA version 6.0.
The new __PTX_SM__ predefined macro allows code to check the PTX
ISA target architecture being targeted by the compiler.
The new __PTX_ISA_VERSION_MAJOR__ and __PTX_ISA_VERSION_MINOR__
predefined macros allows code to check the PTX ISA version being
targeted by the compiler.
-----------------------------------------------------------------------------
gcc-12: Nvptx updates.
Co-Authored-By: Tobias Burnus <tob...@codesourcery.com>
---
htdocs/gcc-12/changes.html | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html
index 689feeba..d95f7253 100644
--- a/htdocs/gcc-12/changes.html
+++ b/htdocs/gcc-12/changes.html
@@ -493,12 +493,33 @@ a work-in-progress.</p>
<h3 id="nvptx">NVPTX</h3>
<ul>
+ <li>The <code>-march</code> flag has been added. The <code>-misa</code>
+ flag is now considered an alias of the <code>-march</code> flag.</li>
+ <li>Support for PTX ISA target architectures <code>sm_53</code>,
+ <code>sm_70</code>, <code>sm_75</code> and <code>sm_80</code> has been
+ added. These can be specified using the <code>-march</code> flag.</li>
+ <li>The default PTX ISA target architecture has been set back
+ to <code>sm_30</code>, to fix support for <code>sm_30</code> boards.</li>
+ <li>The <code>-march-map</code> flag has been added. The
+ <code>-march-map</code> value will be mapped to an valid
+ <code>-march</code> flag value. For instance,
+ <code>-march-map=sm_50</code> maps to <code>-march=sm_35</code>.
+ This can be used to specify that generated code is to be executed on a
+ board with at least some specific compute capability, without having to
+ know the valid values for the <code>-march</code> flag.</li>
<li>The <code>-mptx</code> flag has been added to specify the PTX ISA version
for the generated code; permitted values are <code>3.1</code>
- (default, matches previous GCC versions) and <code>6.3</code>.
+ (matches previous GCC versions), <code>6.0</code>, <code>6.3</code>,
+ and <code>7.0</code>. If not specified, the used version is the minimal
+ version required for <code>-march</code> but at least <code>6.0</code>.
</li>
+ <li>An <code>mptx-3.1</code> multilib was added. This allows using older
+ drivers which do not support PTX ISA version 6.0.</li>
<li>The new <code>__PTX_SM__</code> predefined macro allows code to check the
- compute model being targeted by the compiler.</li>
+ PTX ISA target architecture being targeted by the compiler.</li>
+ <li>The new <code>__PTX_ISA_VERSION_MAJOR__</code>
+ and <code>__PTX_ISA_VERSION_MINOR__</code> predefined macros allows code
+ to check the PTX ISA version being targeted by the compiler.</li>
</ul>
<!-- <h3 id="hppa">PA-RISC</h3> -->