[libcxx] [libcxxabi] [llvm] Adding OpenMP Offloading Backend for C++ Parallel Algorithms (Rebased #66968) (PR #122180)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 8 14:21:20 PST 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r 560b72c0408a8f7e4340a1d4197b164a14cd30b0...563149d603b09ade85a121b49e454c33bb9faf87 libcxx/utils/libcxx/test/features.py libcxx/utils/run.py
``````````

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- libcxx/test/features.py	2025-01-08 22:16:31.000000 +0000
+++ libcxx/test/features.py	2025-01-08 22:20:51.989009 +0000
@@ -383,11 +383,11 @@
 DEFAULT_FEATURES.append(
     Feature(
         name="libcpp-pstl-backend-openmp",
         when=lambda cfg: "_LIBCPP_PSTL_BACKEND_OPENMP" in compilerMacros(cfg),
         actions=[
-            # Do not add -fopenmp-targets for all tests as it includes other libraries 
+            # Do not add -fopenmp-targets for all tests as it includes other libraries
             # and that can mess things up. OpenMP tests will add the flag themselves.
             # However, add everything else needed for OpenMP and offloading:
             AddFlagIfSupported("-fopenmp"),
             # The linker needs to find the correct version of libomptarget and make sure
             # it is used by the binary even in the test environment.
--- run.py	2025-01-08 22:16:31.000000 +0000
+++ run.py	2025-01-08 22:20:52.034550 +0000
@@ -63,12 +63,16 @@
         # TEMP is needed for placing temp files in a sensible directory.
         if "TEMP" in os.environ:
             env["TEMP"] = os.environ.get("TEMP")
 
     # Forwarding offload specific environment variables.
-    for GPU_OPTION in ["CUDA_VISIBLE_DEVICES", "ROCR_VISIBLE_DEVICES", 
-                       "LIBOMPTARGET_INFO","LIBOMPTARGET_DEBUG"]:
+    for GPU_OPTION in [
+        "CUDA_VISIBLE_DEVICES",
+        "ROCR_VISIBLE_DEVICES",
+        "LIBOMPTARGET_INFO",
+        "LIBOMPTARGET_DEBUG",
+    ]:
         if GPU_OPTION in os.environ:
             env[GPU_OPTION] = os.environ[GPU_OPTION]
 
     # If ROCM_PATH is set, forward it and put the ROCM libraries onto the LD_LIBRARY_PATH too.
     if "ROCM_PATH" in os.environ:

``````````

</details>


https://github.com/llvm/llvm-project/pull/122180


More information about the llvm-commits mailing list