Document this new flag, added in
https://gcc.gnu.org/g:2a1586401a21dcd43e0f904bb6eec26c8b2f366b
+ https://gcc.gnu.org/onlinedocs/gcc/Nvidia-PTX-Options.html#index-mptx

Any wording suggestions?

Tobias

PS: Some background remarks:

(PTX ISA 3.1 is supported since NVidia's CUDA 5 while 6.3 is supported since
CUDA 10.0 - and adds very useful new features; current is PTX ISA 7.3
(CUDA 11.3),* but on the PTX side, 6.3 adds a lot, >6.3 only few features,
we still may want to support sometime in the future.)

(The new flag paves the way for additional -misa= flags
(i.e. newer hardware, relevant for enabling ptx instructions which only
newer GPUs support) and newer GPU-hardware-independent PTX ISA features;
hence, either permitting better code generation or for be used to fix bugs.
While this will change during GCC 12, currently, the generated code is
effectively the same with either -mptx= value.)

(Regarding the produced instructions, the installed CUDA will JIT
(and then cache) the GCC-generated nvptx in the binary at startup,
optimizing for the available hardware - i.e. the chosen -mptx and
available -misa do not restrict the hardware ability, just that
PTX instructions which is only available in newer PTX / for newer
hardware may not be generated.)

(* Cf. 
https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#release-notes__ptx-release-history
 )

-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München 
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank 
Thürauf
gcc-12/changes.html: Document -mptx for nvptx

* htdocs/gcc-12/changes.html (nvptx): Document new -mptx flag.

diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html
index 23f71411..6541cf4e 100644
--- a/htdocs/gcc-12/changes.html
+++ b/htdocs/gcc-12/changes.html
@@ -101,8 +101,13 @@ a work-in-progress.</p>
 
 <!-- <h3 id="nios2">Nios II</h3> -->
 
-<!-- <h3 id="nvptx">NVPTX</h3> -->
-
+<h3 id="nvptx">NVPTX</h3>
+<ul>
+  <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 and as used previous GCC versions) and <code>6.3</code>.
+  </li>
+</ul>
 <!-- <h3 id="hppa">PA-RISC</h3> -->
 
 <!-- <h3 id="powerpc">PowerPC / PowerPC64 / RS6000</h3> -->

Reply via email to