[llvm-branch-commits] [openmp] [OpenMP][docs] Finish MyST migration for OpenMP docs (PR #222194)
Michael Kruse via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Sep 15 07:00:53 PDT 2026
================
@@ -1,186 +1,234 @@
-OpenMP Command-Line Argument Reference
-======================================
-Welcome to the OpenMP in LLVM command line argument reference. The content is
-not a complete list of arguments but includes the essential command-line
-arguments you may need when compiling and linking OpenMP.
-Section :ref:`general_command_line_arguments` lists OpenMP command line options
-for multicore programming while :ref:`offload_command_line_arguments` lists
+:::{program} clang
+:::
+
+# OpenMP Command-Line Argument Reference
+
+Welcome to the OpenMP in LLVM command line argument reference. The content is
+not a complete list of arguments but includes the essential command-line
+arguments you may need when compiling and linking OpenMP.
+Section {ref}`general_command_line_arguments` lists OpenMP command line options
+for multicore programming while {ref}`offload_command_line_arguments` lists
options relevant to OpenMP target offloading.
-.. _general_command_line_arguments:
+(general_command_line_arguments)=
+
+## OpenMP Command-Line Arguments
-OpenMP Command-Line Arguments
------------------------------
+(fopenmp)=
-``-fopenmp``
-^^^^^^^^^^^^
-Enable the OpenMP compilation toolchain. The compiler will parse OpenMP
+:::{option} -fopenmp
+Enable the OpenMP compilation toolchain. The compiler will parse OpenMP
compiler directives and generate parallel code.
+:::
-``-fopenmp-extensions``
-^^^^^^^^^^^^^^^^^^^^^^^
-Enable all ``Clang`` extensions for OpenMP directives and clauses. A list of
-current extensions and their implementation status can be found on the
-`support <https://clang.llvm.org/docs/OpenMPSupport.html#openmp-extensions>`_
+(fopenmp-extensions)=
+
+:::{option} -fopenmp-extensions
+Enable all `Clang` extensions for OpenMP directives and clauses. A list of
+current extensions and their implementation status can be found on the
+[support](https://clang.llvm.org/docs/OpenMPSupport.html#openmp-extensions)
page.
+:::
+
+(fopenmp-simd)=
-``-fopenmp-simd``
-^^^^^^^^^^^^^^^^^
-This option enables OpenMP only for single instruction, multiple data
+:::{option} -fopenmp-simd
+This option enables OpenMP only for single instruction, multiple data
(SIMD) constructs.
+:::
+
+(static-openmp)=
-``-static-openmp``
-^^^^^^^^^^^^^^^^^^
+:::{option} -static-openmp
Use the static OpenMP host runtime while linking.
+:::
+
+(fopenmp-version-arg)=
+
+:::{option} -fopenmp-version=<arg>
+Set the OpenMP version to a specific version `<arg>` of the OpenMP standard.
+For example, you may use `-fopenmp-version=45` to select version 4.5 of
+the OpenMP standard. The default value is `-fopenmp-version=51` for `Clang`.
+:::
+
+(offload_command_line_arguments)=
+
+## Offloading Specific Command-Line Arguments
+
+(fopenmp-targets)=
+
+:::{option} -fopenmp-targets
+Specify which OpenMP offloading targets should be supported. For example, you
+may specify `-fopenmp-targets=amdgcn-amd-amdhsa,nvptx64`. This option is
+often optional when {ref}`--offload-arch <offload_arch>` is provided.
-``-fopenmp-version=<arg>``
-^^^^^^^^^^^^^^^^^^^^^^^^^^
-Set the OpenMP version to a specific version ``<arg>`` of the OpenMP standard.
-For example, you may use ``-fopenmp-version=45`` to select version 4.5 of
-the OpenMP standard. The default value is ``-fopenmp-version=51`` for ``Clang``.
-
-.. _offload_command_line_arguments:
-
-Offloading Specific Command-Line Arguments
-------------------------------------------
-
-.. _fopenmp-targets:
-
-``-fopenmp-targets``
-^^^^^^^^^^^^^^^^^^^^
-| Specify which OpenMP offloading targets should be supported. For example, you
- may specify ``-fopenmp-targets=amdgcn-amd-amdhsa,nvptx64``. This option is
- often optional when :ref:`offload_arch` is provided.
-| It is also possible to offload to CPU architectures, for instance with
- ``-fopenmp-targets=x86_64-pc-linux-gnu``.
-
-.. _offload_arch:
-
-``--offload-arch``
-^^^^^^^^^^^^^^^^^^
-| Specify the device architecture for OpenMP offloading. For instance
- ``--offload-arch=sm_80`` to target an Nvidia Tesla A100,
- ``--offload-arch=gfx90a`` to target an AMD Instinct MI250X, or
- ``--offload-arch=sm_80,gfx90a`` to target both.
-| It is also possible to specify :ref:`fopenmp-targets` without specifying
- ``--offload-arch``. In that case, the executables ``amdgpu-arch`` or
- ``nvptx-arch`` will be executed as part of the compiler driver to
- detect the device architecture automatically.
-| Finally, the device architecture will also be automatically inferred with
- ``--offload-arch=native``.
-
-``--offload-device-only``
-^^^^^^^^^^^^^^^^^^^^^^^^^
-Compile only the code that goes on the device. This option is mainly for
-debugging purposes. It is primarily used for inspecting the intermediate
-representation (IR) output when compiling for the device. It may also be used
+It is also possible to offload to CPU architectures, for instance with
+`-fopenmp-targets=x86_64-pc-linux-gnu`.
+:::
+
+(offload_arch)=
+
+:::{option} --offload-arch
+Specify the device architecture for OpenMP offloading. For instance
+`--offload-arch=sm_80` to target an Nvidia Tesla A100,
+`--offload-arch=gfx90a` to target an AMD Instinct MI250X, or
+`--offload-arch=sm_80,gfx90a` to target both.
+
+It is also possible to specify {option}`-fopenmp-targets` without specifying
+`--offload-arch`. In that case, the executables `amdgpu-arch` or
+`nvptx-arch` will be executed as part of the compiler driver to
+detect the device architecture automatically.
+
+Finally, the device architecture will also be automatically inferred with
+`--offload-arch=native`.
+:::
+
+(offload-device-only)=
+
+:::{option} --offload-device-only
+Compile only the code that goes on the device. This option is mainly for
+debugging purposes. It is primarily used for inspecting the intermediate
+representation (IR) output when compiling for the device. It may also be used
if device-only runtimes are created.
+:::
-``--offload-host-only``
-^^^^^^^^^^^^^^^^^^^^^^^
+(offload-host-only)=
+
+:::{option} --offload-host-only
Compile only the code that goes on the host. With this option enabled, the
-``.llvm.offloading`` section with embedded device code will not be included in
+`.llvm.offloading` section with embedded device code will not be included in
the intermediate representation.
+:::
+
+(offload-host-device)=
-``--offload-host-device``
-^^^^^^^^^^^^^^^^^^^^^^^^^
-Compile the target regions for both the host and the device. That is the
+:::{option} --offload-host-device
+Compile the target regions for both the host and the device. That is the
default option.
+:::
+
+(xopenmp-target-arg)=
+
+(xopenmp-target-triple-arg)=
+
+:::{option} -Xopenmp-target[=<triple>] <arg>
+Pass an argument `<arg>` to the offloading toolchain, for instance
+`-Xopenmp-target -march=sm_80`.
-``-Xopenmp-target <arg>``
-^^^^^^^^^^^^^^^^^^^^^^^^^
-Pass an argument ``<arg>`` to the offloading toolchain, for instance
-``-Xopenmp-target -march=sm_80``.
-
-``-Xopenmp-target=<triple> <arg>``
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Pass an argument ``<arg>`` to the offloading toolchain for the target
-``<triple>``. That is especially useful when an argument must differ for each
-triple. For instance ``-Xopenmp-target=nvptx64 --offload-arch=sm_80
--Xopenmp-target=amdgcn --offload-arch=gfx90a`` to specify the device
-architecture. Alternatively, :ref:`Xarch_host` and :ref:`Xarch_device` can
+Pass an argument `<arg>` to the offloading toolchain for the target
+`<triple>`. That is especially useful when an argument must differ for each
+triple. For instance `-Xopenmp-target=nvptx64 --offload-arch=sm_80
+-Xopenmp-target=amdgcn --offload-arch=gfx90a` to specify the device
+architecture. Alternatively, {ref}`-Xarch_host <Xarch_host>` and
+{ref}`-Xarch_device <Xarch_device>` can
----------------
Meinersbur wrote:
Similar problem, renders as
<img width="304" height="45" alt="Image" src="https://github.com/user-attachments/assets/9a35eb85-b98c-45ee-a66e-1e9f285f3161" />
ReST version:
<img width="418" height="43" alt="Image" src="https://github.com/user-attachments/assets/313e490c-9f59-481d-bda7-7241e68098c3" />
https://github.com/llvm/llvm-project/pull/222194
More information about the llvm-branch-commits
mailing list