diff mbox series

[wwwdocs] gcc-12/changes.html: Document -mptx for nvptx

Message ID 0b73f43a-1bc2-116b-9fcf-7eb356f5d9d3@codesourcery.com
State New
Headers show
Series [wwwdocs] gcc-12/changes.html: Document -mptx for nvptx | expand

Commit Message

Tobias Burnus May 13, 2021, 10:06 p.m. UTC
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

Comments

Tobias Burnus May 17, 2021, 8:49 a.m. UTC | #1
Early *PING*  - and I fixed a wording issue in my patch.

OK? Suggestions?

Tobias

On 14.05.21 00:06, Tobias Burnus wrote:
> 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
Tom de Vries May 17, 2021, 9:13 a.m. UTC | #2
On 5/17/21 10:49 AM, Tobias Burnus wrote:
> Early *PING*  - and I fixed a wording issue in my patch.
> 
> OK? Suggestions?
> 

LGTM, thanks.
- Tom

> Tobias
> 
> On 14.05.21 00:06, Tobias Burnus wrote:
>> 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
diff mbox series

Patch

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