Merge pull request #800 from emankov/master
[HIPIFY][tests][fix] Add correct CUDA version detection while testing
[ROCm/hip commit: 7741457dea]
This commit is contained in:
@@ -8,6 +8,24 @@ import lit.formats
|
||||
import lit.util
|
||||
|
||||
# Configuration file for the 'lit' test runner.
|
||||
site_cfg = lit_config.params.get('site_config', None)
|
||||
lit_config.load_config(config, site_cfg)
|
||||
|
||||
print("CUDA " + config.cuda_version + " will be used for testing.")
|
||||
|
||||
config.excludes = ['cmdparser.hpp']
|
||||
|
||||
if config.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 config.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')
|
||||
|
||||
# name: The name of this test suite.
|
||||
config.name = 'hipify'
|
||||
@@ -21,15 +39,6 @@ config.test_format = lit.formats.ShTest()
|
||||
# test_source_root: The root path where tests are located.
|
||||
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']:
|
||||
config.excludes.append('cuSPARSE_08.cu')
|
||||
config.excludes.append('cuSPARSE_09.cu')
|
||||
config.excludes.append('cuSPARSE_10.cu')
|
||||
config.excludes.append('cuSPARSE_11.cu')
|
||||
|
||||
# test_exec_root: The path where tests are located (default is the test suite root).
|
||||
#config.test_exec_root = config.test_source_root
|
||||
|
||||
@@ -39,9 +48,6 @@ config.target_triple = '(unused)'
|
||||
# available_features: Used by ShTest and TclTest formats for REQUIRES checks.
|
||||
config.available_features = []
|
||||
|
||||
site_cfg = lit_config.params.get('site_config', None)
|
||||
lit_config.load_config(config, site_cfg)
|
||||
|
||||
obj_root = getattr(config, 'obj_root', None)
|
||||
if obj_root is not None:
|
||||
config.test_exec_root = obj_root
|
||||
|
||||
@@ -5,10 +5,12 @@ config.llvm_tools_dir = "@LLVM_TOOLS_BINARY_DIR@"
|
||||
config.obj_root = "@CMAKE_CURRENT_BINARY_DIR@"
|
||||
config.cuda_root = "@CUDA_TOOLKIT_ROOT_DIR@"
|
||||
config.cuda_dnn_root = "@CUDA_DNN_ROOT_DIR@"
|
||||
config.cuda_version_major = int("@CUDA_VERSION_MAJOR@")
|
||||
config.cuda_version = "@CUDA_VERSION@"
|
||||
if sys.platform in ['win32']:
|
||||
config.cuda_sdk_root = "@CUDA_SDK_ROOT_DIR@"
|
||||
if not config.cuda_sdk_root or config.cuda_sdk_root == "CUDA_SDK_ROOT_DIR-NOTFOUND":
|
||||
cuda_version = "@CUDA_VERSION@"
|
||||
cuda_version = config.cuda_version
|
||||
cuda_version = cuda_version.replace('.','_')
|
||||
config.cuda_samples_root = os.environ.get('NVCUDASAMPLES' + cuda_version + '_ROOT')
|
||||
if not config.cuda_samples_root:
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user