[PATCH] D47890: [Polly][zorg] Enable GPGPU Codegen on the builders only if NVPTX is an LLVM target

Philip Pfaffe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 7 14:18:31 PDT 2018


philip.pfaffe updated this revision to Diff 150405.
philip.pfaffe marked an inline comment as done.
philip.pfaffe added a comment.

Add a comment


https://reviews.llvm.org/D47890

Files:
  zorg/buildbot/builders/PollyBuilder.py


Index: zorg/buildbot/builders/PollyBuilder.py
===================================================================
--- zorg/buildbot/builders/PollyBuilder.py
+++ zorg/buildbot/builders/PollyBuilder.py
@@ -70,11 +70,16 @@
                            haltOnFailure=False,
                            description=["create build dir"],
                            workdir="."))
+
     cmakeCommand = ["cmake", "../%s" %llvm_srcdir,
                     "-DCMAKE_COLOR_MAKEFILE=OFF",
                     "-DPOLLY_TEST_DISABLE_BAR=ON",
-                    "-DPOLLY_ENABLE_GPGPU_CODEGEN=ON",
                     "-DCMAKE_BUILD_TYPE=Release"] + cmake_install + extraCmakeArgs
+    hasNVPTX = any(True for A in reversed(extraCmakeArgs)
+                   if 'LLVM_TARGETS_TO_BUILD' in A and 'NVPTX' in A)
+    if hasNVPTX: # The NVPTX target is required to generate GPU code
+        cmakeCommand.append("-DPOLLY_ENABLE_GPGPU_CODEGEN=ON")
+
     f.addStep(ShellCommand(name="cmake-configure",
                            command=cmakeCommand,
                            haltOnFailure=False,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47890.150405.patch
Type: text/x-patch
Size: 1086 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180607/c1b454b3/attachment.bin>


More information about the llvm-commits mailing list