[HIPIFY][tests][fix] Add correct CUDA version detection while testing
+ Add lit.cfg.in for CMake variables substitution to now generated lit.cfg
+ Exclude lit.cfg
+ Exclude CUDA 9.0 tests if CUDA < 9.0
+ Report CUDA version before running tests
[ROCm/clr commit: 2b01f1eb6f]
这个提交包含在:
@@ -111,6 +111,12 @@ if (HIPIFY_CLANG_TESTS)
|
||||
@ONLY
|
||||
)
|
||||
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_LIST_DIR}/../tests/hipify-clang/lit.cfg.in
|
||||
${CMAKE_CURRENT_LIST_DIR}/../tests/hipify-clang/lit.cfg
|
||||
@ONLY
|
||||
)
|
||||
|
||||
add_lit_testsuite(test-hipify "Running HIPify regression tests"
|
||||
${CMAKE_CURRENT_LIST_DIR}/../tests/hipify-clang
|
||||
PARAMS site_config=${CMAKE_CURRENT_BINARY_DIR}/tests/hipify-clang/lit.site.cfg
|
||||
|
||||
+12
-2
@@ -23,13 +23,23 @@ config.test_source_root = os.path.dirname(__file__)
|
||||
|
||||
config.excludes = ['cmdparser.hpp']
|
||||
|
||||
config.cuda_version = "@CUDA_VERSION@"
|
||||
if config.cuda_version not in ['10.0']:
|
||||
cuda_version_major = int("@CUDA_VERSION_MAJOR@")
|
||||
cuda_version = "@CUDA_VERSION@"
|
||||
|
||||
if cuda_version_major < 9:
|
||||
config.excludes.append('cuSPARSE_04.cu')
|
||||
config.excludes.append('cuSPARSE_05.cu')
|
||||
config.excludes.append('cuSPARSE_06.cu')
|
||||
config.excludes.append('cuSPARSE_07.cu')
|
||||
|
||||
if cuda_version_major < 10:
|
||||
config.excludes.append('cuSPARSE_08.cu')
|
||||
config.excludes.append('cuSPARSE_09.cu')
|
||||
config.excludes.append('cuSPARSE_10.cu')
|
||||
config.excludes.append('cuSPARSE_11.cu')
|
||||
|
||||
print("CUDA " + cuda_version + " will be used for testing.")
|
||||
|
||||
# test_exec_root: The path where tests are located (default is the test suite root).
|
||||
#config.test_exec_root = config.test_source_root
|
||||
|
||||
在新工单中引用
屏蔽一个用户