[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 09:24:07 PDT 2018


philip.pfaffe created this revision.
philip.pfaffe added reviewers: Meinersbur, grosser.
Herald added a reviewer: bollu.
Herald added a subscriber: bollu.
Herald added a reviewer: bollu.

GPGPU Codegeneration requires the LLVM NVPTX target for it to work.
https://reviews.llvm.org/D47888 switches it off if that's not available, but still emits a warning.
Instead, just figure out if NVPTX is enabled and only then switch on GPGPU
codegen.


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:
+        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.150350.patch
Type: text/x-patch
Size: 1034 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180607/c63f0ef8/attachment.bin>


More information about the llvm-commits mailing list