@@ -524,13 +524,35 @@ description. The AMDGPU target specific information is:
524
524
**target-feature**
525
525
Is a target feature name specified in :ref:`amdgpu-target-features-table` that
526
526
is supported by the processor. The target features supported by each processor
527
- is specified in :ref:`amdgpu-processor-table`. Those that can be specifeid in
527
+ is specified in :ref:`amdgpu-processor-table`. Those that can be specified in
528
528
a target ID are marked as being controlled by ``-mcpu`` and
529
529
``--offload-arch``. Each target feature must appear at most once in a target
530
530
ID. The non-canonical form target ID allows the target features to be
531
531
specified in any order. The canonical form target ID requires the target
532
532
features to be specified in alphabetic order.
533
533
534
+ .. _amdgpu-target-id-v2-v3:
535
+
536
+ Code Object V2 to V3 Target ID
537
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
538
+
539
+ The target ID syntax for code object V2 to V3 is the same as defined in `Clang
540
+ Offload Bundler <https://clang.llvm.org/docs/ClangOffloadBundler.html>`_ except
541
+ when used in the :ref:`amdgpu-assembler-directive-amdgcn-target` assembler
542
+ directive and the bundle entry ID. In those cases it has the following BNF
543
+ syntax:
544
+
545
+ .. code::
546
+
547
+ <target-id> ::== <processor> ( "+" <target-feature> )*
548
+
549
+ Where a target feature is omitted if *Off* and present if *On* or *Any*.
550
+
551
+ .. note::
552
+
553
+ The code object V2 to V3 cannot represent *Any* and treats it the same as
554
+ *On*.
555
+
534
556
.. _amdgpu-embedding-bundled-objects:
535
557
536
558
Embedding Bundled Code Objects
@@ -540,6 +562,11 @@ AMDGPU supports the HIP and OpenMP languages that perform code object embedding
540
562
as described in `Clang Offload Bundler
541
563
<https://clang.llvm.org/docs/ClangOffloadBundler.html>`_.
542
564
565
+ .. note::
566
+
567
+ The target ID syntax used for code object V2 to V3 for a bundle entry ID
568
+ differs from that used elsewhere. See :ref:`amdgpu-target-id-v2-v3`.
569
+
543
570
.. _amdgpu-address-spaces:
544
571
545
572
Address Spaces
@@ -9196,6 +9223,8 @@ architecture processors, and are not OS-specific. Directives which begin with
9196
9223
``amdhsa`` OS is specified. See :ref:`amdgpu-target-triples` and
9197
9224
:ref:`amdgpu-processors`.
9198
9225
9226
+ .. _amdgpu-assembler-directive-amdgcn-target:
9227
+
9199
9228
.amdgcn_target <target-triple> "-" <target-id>
9200
9229
++++++++++++++++++++++++++++++++++++++++++++++
9201
9230
@@ -9205,6 +9234,11 @@ command-line options such as ``-triple``, ``-mcpu``, and
9205
9234
``--offload-arch=<target-id>``. A non-canonical target ID is allowed. See
9206
9235
:ref:`amdgpu-target-triples` and :ref:`amdgpu-target-id`.
9207
9236
9237
+ .. note::
9238
+
9239
+ The target ID syntax used for code object V2 to V3 for this directive differs
9240
+ from that used elsewhere. See :ref:`amdgpu-target-id-v2-v3`.
9241
+
9208
9242
.amdhsa_kernel <name>
9209
9243
+++++++++++++++++++++
9210
9244
0 commit comments