[polly] r208779 - Do not run GPGPU test cases without nvptx target

Tobias Grosser tobias at grosser.es
Wed May 14 07:18:14 PDT 2014


Author: grosser
Date: Wed May 14 09:18:14 2014
New Revision: 208779

URL: http://llvm.org/viewvc/llvm-project?rev=208779&view=rev
Log:
Do not run GPGPU test cases without nvptx target

Tag the GPGPU codegen test cases as unsupported if the nvptx target is not
included in the current llvm build.

Contributed-by:  Yabin Hu <yabin.hwu at gmail.com>

Modified:
    polly/trunk/test/CMakeLists.txt
    polly/trunk/test/Cloog/CodeGen/GPGPU/2d_innermost_parallel.ll
    polly/trunk/test/Cloog/CodeGen/GPGPU/3d_innermost_non_parallel.ll
    polly/trunk/test/lit.cfg

Modified: polly/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CMakeLists.txt?rev=208779&r1=208778&r2=208779&view=diff
==============================================================================
--- polly/trunk/test/CMakeLists.txt (original)
+++ polly/trunk/test/CMakeLists.txt Wed May 14 09:18:14 2014
@@ -62,7 +62,7 @@ if (NOT DEFINED LLVM_MAIN_SRC_DIR)
 else (NOT DEFINED LLVM_MAIN_SRC_DIR)
 
   set(LLVM_LIT ${LLVM_TOOLS_BINARY_DIR}/llvm-lit)
-  set(POLLY_TEST_DEPS opt LLVMPolly FileCheck not)
+  set(POLLY_TEST_DEPS llvm-config opt LLVMPolly FileCheck not)
 
   set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}")
   set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}")

Modified: polly/trunk/test/Cloog/CodeGen/GPGPU/2d_innermost_parallel.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Cloog/CodeGen/GPGPU/2d_innermost_parallel.ll?rev=208779&r1=208778&r2=208779&view=diff
==============================================================================
--- polly/trunk/test/Cloog/CodeGen/GPGPU/2d_innermost_parallel.ll (original)
+++ polly/trunk/test/Cloog/CodeGen/GPGPU/2d_innermost_parallel.ll Wed May 14 09:18:14 2014
@@ -1,3 +1,4 @@
+; REQUIRES: nvptx-registered-target
 ; RUN: opt %loadPolly -basicaa -polly-import-jscop -polly-import-jscop-dir=%S -polly-import-jscop-postfix=transformed+gpu -enable-polly-gpgpu -polly-gpgpu-triple=nvptx64-unknown-unknown -polly-codegen < %s -S | FileCheck %s
 
 ;int A[128][128];

Modified: polly/trunk/test/Cloog/CodeGen/GPGPU/3d_innermost_non_parallel.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Cloog/CodeGen/GPGPU/3d_innermost_non_parallel.ll?rev=208779&r1=208778&r2=208779&view=diff
==============================================================================
--- polly/trunk/test/Cloog/CodeGen/GPGPU/3d_innermost_non_parallel.ll (original)
+++ polly/trunk/test/Cloog/CodeGen/GPGPU/3d_innermost_non_parallel.ll Wed May 14 09:18:14 2014
@@ -1,3 +1,4 @@
+; REQUIRES: nvptx-registered-target
 ; RUN: opt %loadPolly -basicaa -polly-import-jscop -polly-import-jscop-dir=%S -polly-import-jscop-postfix=transformed+gpu -enable-polly-gpgpu -polly-gpgpu-triple=nvptx64-unknown-unknown -polly-codegen < %s -S | FileCheck %s
 
 ;int A[128][128];

Modified: polly/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/lit.cfg?rev=208779&r1=208778&r2=208779&view=diff
==============================================================================
--- polly/trunk/test/lit.cfg (original)
+++ polly/trunk/test/lit.cfg Wed May 14 09:18:14 2014
@@ -111,3 +111,16 @@ except OSError, why:
 if re.search(r'with assertions', opt_cmd.stdout.read()):
     config.available_features.add('asserts')
 opt_cmd.wait()
+
+try:
+    llvm_config_cmd = subprocess.Popen([os.path.join(llvm_tools_dir,
+                                                     'llvm-config'),
+                                        '--targets-built'],
+                                       stdout = subprocess.PIPE)
+except OSError, why:
+    print "Could not find llvm-config in " + llvm_tools_dir
+    exit(42)
+
+if re.search(r'NVPTX', llvm_config_cmd.stdout.read()):
+    config.available_features.add('nvptx-registered-target')
+llvm_config_cmd.wait()





More information about the llvm-commits mailing list