aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtem Belevich <tra@google.com>2018-07-27 18:11:34 +0000
committerArtem Belevich <tra@google.com>2018-07-27 18:11:34 +0000
commitb3be2fa910f17d2f8dd556f3c56d7beed48157c3 (patch)
treefe6ca3011de8e59f7fea9c7c9df57ca39a27e8ec
parent143f713a0169f23a979dc5b44f0b0735b97861cc (diff)
[test-suite, CUDA] Filter out long-running redundant SIMD tests.
Summary: The tests do not depend on C++ library or C++ dialect. We only need SIMD tests on CUDA-8.0 and 9.2. First one is to verify our reference implementation against CUDA-provided one. The second one actually tests clang-provided implementation of these functions. Reviewers: jlebar Differential Revision: https://reviews.llvm.org/D49889 git-svn-id: https://llvm.org/svn/llvm-project/test-suite/trunk@338142 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--External/CUDA/CMakeLists.txt54
1 files changed, 33 insertions, 21 deletions
diff --git a/External/CUDA/CMakeLists.txt b/External/CUDA/CMakeLists.txt
index f7ec50fd..fbedaf74 100644
--- a/External/CUDA/CMakeLists.txt
+++ b/External/CUDA/CMakeLists.txt
@@ -52,27 +52,33 @@ macro(cuda_glob Var)
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 @@ macro(create_local_cuda_tests VariantSuffix)
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)