[Openmp-commits] [openmp] [openmp][docs] Rewrite remaining rst docs to md [2/2] (PR #234020)
Sachin 🗲 via Openmp-commits
openmp-commits at lists.llvm.org
Tue Oct 20 15:48:12 PDT 2026
https://github.com/s4chinjha created https://github.com/llvm/llvm-project/pull/234020
Tracking issue: [#201242](https://github.com/llvm/llvm-project/issues/201242)
See the [migration guide](https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines) for more information.
this is the second part of migrating the remaining openmp readme from rst to md
the content conversion is provided by this pr, following the rename in the previous pr
Depends on #234018
the first commit is from the base pr (rename), the second commit contains the content conversion
>From 0e5063dc660c1927ed282dfef0ce5f987727196f Mon Sep 17 00:00:00 2001
From: s4chinjha <s4chinjha at gmail.com>
Date: Wed, 21 Oct 2026 02:40:38 +0530
Subject: [PATCH 1/2] [openmp][docs] Rename remaining rst docs to md
---
openmp/tools/Modules/{README.rst => README.md} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename openmp/tools/Modules/{README.rst => README.md} (100%)
diff --git a/openmp/tools/Modules/README.rst b/openmp/tools/Modules/README.md
similarity index 100%
rename from openmp/tools/Modules/README.rst
rename to openmp/tools/Modules/README.md
>From 366fa557b3a4557a6c1515dd75a1eaf92bd4d523 Mon Sep 17 00:00:00 2001
From: s4chinjha <s4chinjha at gmail.com>
Date: Wed, 21 Oct 2026 02:44:50 +0530
Subject: [PATCH 2/2] [openmp][docs] Rewrite remaining docs to md
---
openmp/tools/Modules/README.md | 40 ++++++++++++++++------------------
1 file changed, 19 insertions(+), 21 deletions(-)
diff --git a/openmp/tools/Modules/README.md b/openmp/tools/Modules/README.md
index b8cc5f08b390b0..6f50fa2c236256 100644
--- a/openmp/tools/Modules/README.md
+++ b/openmp/tools/Modules/README.md
@@ -1,44 +1,42 @@
-=========================
-LLVM OpenMP CMake Modules
-=========================
+# LLVM OpenMP CMake Modules
This directory contains CMake modules for OpenMP. These can be included into a
project to include different OpenMP features.
-.. contents::
- :local:
+```{contents}
+:local: true
+```
-Find OpenMP Target Support
-==========================
+## Find OpenMP Target Support
This module will attempt to find OpenMP target offloading support for a given
device. The module will attempt to compile a test program using known compiler
flags for each requested architecture. If successful, the flags required for
-offloading will be loaded into the ``OpenMPTarget::OpenMPTarget_<device>``
-target or the ``OpenMPTarget_<device>_FLAGS`` variable. Currently supported target
-devices are ``NVPTX`` and ``AMDGPU``. This module is still under development so
+offloading will be loaded into the `OpenMPTarget::OpenMPTarget_<device>`
+target or the `OpenMPTarget_<device>_FLAGS` variable. Currently supported target
+devices are `NVPTX` and `AMDGPU`. This module is still under development so
some features may be missing.
To use this module, simply add the path to CMake's current module path and call
-``find_package``. The module will be installed with your OpenMP installation by
+`find_package`. The module will be installed with your OpenMP installation by
default. Including OpenMP offloading support in an application should now only
require a few additions.
-.. code-block:: cmake
+```cmake
+cmake_minimum_required(VERSION 3.20.0)
+project(offloadTest VERSION 1.0 LANGUAGES CXX)
- cmake_minimum_required(VERSION 3.20.0)
- project(offloadTest VERSION 1.0 LANGUAGES CXX)
+list(APPEND CMAKE_MODULE_PATH "${PATH_TO_OPENMP_INSTALL}/lib/cmake/openmp")
- list(APPEND CMAKE_MODULE_PATH "${PATH_TO_OPENMP_INSTALL}/lib/cmake/openmp")
+find_package(OpenMPTarget REQUIRED NVPTX)
- find_package(OpenMPTarget REQUIRED NVPTX)
-
- add_executable(offload)
- target_link_libraries(offload PRIVATE OpenMPTarget::OpenMPTarget_NVPTX)
- target_sources(offload PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/Main.cpp)
+add_executable(offload)
+target_link_libraries(offload PRIVATE OpenMPTarget::OpenMPTarget_NVPTX)
+target_sources(offload PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/Main.cpp)
+```
Using this module requires at least CMake version 3.20.0. Supported languages
are C and C++ with Fortran support planned in the future. If your application
requires building for a specific device architecture you can set the
-``OpenMPTarget_<device>_ARCH=<flag>`` variable. Compiler support is best for
+`OpenMPTarget_<device>_ARCH=<flag>` variable. Compiler support is best for
Clang but this module should work for other compiler vendors such as IBM or GNU.
More information about the Openmp-commits
mailing list