[llvm] [Offload] Fix disabling of cuda target on unsupported platforms (PR #106835)

via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 31 01:38:05 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-offload

Author: WÁNG Xuěruì (xen0n)

<details>
<summary>Changes</summary>

The target name and the message are wrong -- both should say "cuda" for the filtering to work.

Fixes commit 300e5b911442 (#<!-- -->93186).

---
Full diff: https://github.com/llvm/llvm-project/pull/106835.diff


1 Files Affected:

- (modified) offload/CMakeLists.txt (+2-2) 


``````````diff
diff --git a/offload/CMakeLists.txt b/offload/CMakeLists.txt
index 4cd97a6a5ff63d..d91b5fa1959295 100644
--- a/offload/CMakeLists.txt
+++ b/offload/CMakeLists.txt
@@ -159,8 +159,8 @@ if(NOT (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(ppc64le)|(aarch64)$"
                    "Linux x86_64, ppc64le, or aarch64 hosts")
     list(REMOVE_ITEM LIBOMPTARGET_PLUGINS_TO_BUILD "amdgpu")
   endif()
-  if("nvptx" IN_LIST LIBOMPTARGET_PLUGINS_TO_BUILD)
-    message(STATUS "Not building CUDA plugin: only support AMDGPU in "
+  if("cuda" IN_LIST LIBOMPTARGET_PLUGINS_TO_BUILD)
+    message(STATUS "Not building CUDA plugin: only support CUDA in "
                    "Linux x86_64, ppc64le, or aarch64 hosts")
     list(REMOVE_ITEM LIBOMPTARGET_PLUGINS_TO_BUILD "cuda")
   endif()

``````````

</details>


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


More information about the llvm-commits mailing list