[HIPIFY][tests] Set max clang's CudaArch for corresponding CUDA version

[Reason] To support maximum CUDA features in offline tests

+ Add CUDA_VERSION >= 800 restriction for atomics.cu

[TODO] Find a way to use or exclude atomicAdd for doubles if LLVM < 7, because
LLVM 6.0.1 and older do not use --cuda-gpu-arch in clang's Driver code at all (option is only declared)


[ROCm/hip commit: 14b4df126c]
이 커밋은 다음에 포함됨:
Evgeny Mankov가 2019-10-21 15:51:25 +03:00를 커밋했습니다
1 부모 57b2e130e0
커밋 f345ec8c58
2 파일이 변경됨
+13

검색과 일치하는 파일 없음

+11
파일 보기
@@ -108,6 +108,17 @@ else:
if config.pointer_size == 8:
clang_arguments += " -D__LP64__"
# Set max clang's CudaArch for corresponding CUDA version
# to support maximum CUDA features in offline tests
if config.cuda_version_major == 7:
clang_arguments += " --cuda-gpu-arch=sm_52"
if config.cuda_version_major == 8:
clang_arguments += " --cuda-gpu-arch=sm_62"
if config.cuda_version_major == 9:
clang_arguments += " --cuda-gpu-arch=sm_70"
if config.cuda_version_major == 10:
clang_arguments += " --cuda-gpu-arch=sm_75"
# cuDNN ROOT
if config.cuda_dnn_root:
clang_arguments += " -I'%s'/include"
+2
파일 보기
@@ -276,7 +276,9 @@ int main(int argc, char** argv) {
runTest<unsigned int>();
runTest<unsigned long long>();
runTest<float>();
#if CUDA_VERSION >= 8000
runTest<double>();
#endif
// CHECK: hipDeviceReset();
cudaDeviceReset();
printf("%s completed, returned %s\n", sampleName, testResult ? "OK" : "ERROR!");