[PATCH] D49889: [test-suite, CUDA] Filter out long-running redundant SIMD tests.

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 27 11:13:38 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL338142: [test-suite, CUDA] Filter out long-running redundant SIMD tests. (authored by tra, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D49889?vs=157609&id=157714#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D49889

Files:
  test-suite/trunk/External/CUDA/CMakeLists.txt


Index: test-suite/trunk/External/CUDA/CMakeLists.txt
===================================================================
--- test-suite/trunk/External/CUDA/CMakeLists.txt
+++ test-suite/trunk/External/CUDA/CMakeLists.txt
@@ -52,27 +52,33 @@
   set(${Var} ${FileList})
 endmacro(cuda_glob)
 
-macro(create_one_local_test Name FileGlob)
-  cuda_glob(_sources ${FileGlob})
-  set(_executable ${Name}-${VariantSuffix})
-  set(_executable_path ${CMAKE_CURRENT_BINARY_DIR}/${_executable})
-  # Verify reference output if it exists.
-  if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${Name}.reference_output)
-    set(NO_REFERENCE_OUTPUT 1)
-    set(REFERENCE_OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${Name}.reference_output)
-    llvm_test_traditional(${_executable})
-  else()
-    # otherwise just run the executable.
-    llvm_test_run()
-  endif()
-  llvm_test_executable(${_executable} ${_sources})
-  target_compile_options(${_executable} PUBLIC ${VariantCPPFLAGS})
-  if(VariantLibs)
-    target_link_libraries(${_executable} ${VariantLibs})
+macro(create_one_local_test_f Name FileGlob FilterRegex)
+  if (${VariantSuffix} MATCHES ${FilterRegex})
+    cuda_glob(_sources ${FileGlob})
+    set(_executable ${Name}-${VariantSuffix})
+    set(_executable_path ${CMAKE_CURRENT_BINARY_DIR}/${_executable})
+    # Verify reference output if it exists.
+    if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${Name}.reference_output)
+      set(NO_REFERENCE_OUTPUT 1)
+      set(REFERENCE_OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${Name}.reference_output)
+      llvm_test_traditional(${_executable})
+    else()
+      # otherwise just run the executable.
+      llvm_test_run()
+    endif()
+    llvm_test_executable(${_executable} ${_sources})
+    target_compile_options(${_executable} PUBLIC ${VariantCPPFLAGS})
+    if(VariantLibs)
+      target_link_libraries(${_executable} ${VariantLibs})
+    endif()
+    add_dependencies(cuda-tests-simple-${VariantSuffix} ${_executable})
+    # Local tests are presumed to be fast.
+    list(APPEND CUDA_SIMPLE_TEST_TARGETS ${_executable}.test)
   endif()
-  add_dependencies(cuda-tests-simple-${VariantSuffix} ${_executable})
-  # Local tests are presumed to be fast.
-  list(APPEND CUDA_SIMPLE_TEST_TARGETS ${_executable}.test)
+endmacro()
+
+macro(create_one_local_test Name FileGlob)
+  create_one_local_test_f(${Name} ${FileGlob} ".*")
 endmacro()
 
 # Create targets for CUDA tests that are part of the test suite.
@@ -87,7 +93,13 @@
   create_one_local_test(empty empty.cu)
   create_one_local_test(printf printf.cu)
   create_one_local_test(future future.cu)
-  create_one_local_test(simd simd.cu)
+  # We only need SIMD tests on CUDA-8.0 to verivy that our reference is correct
+  # and matches NVIDIA-provided one.  and on CUDA-9.2 to verify that clang's
+  # implementation matches the reference.  This test also happens to be the
+  # longest one, so by not running unnecessary instances we speed up cuda
+  # buildbot a lot.
+  create_one_local_test_f(simd simd.cu
+                          "cuda-(8[.]0|9[.]2)-c[+][+]11-libc[+][+]")
 endmacro()
 
 macro(thrust_make_test_name TestName TestSourcePath)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49889.157714.patch
Type: text/x-patch
Size: 3125 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180727/1b2e2584/attachment.bin>


More information about the llvm-commits mailing list