adopted DKS to Cuda12 and GV100. For Tesla K40c code lines are still present but commented by as35.

This commit is contained in:
2023-01-30 12:38:52 +01:00
parent efa3311b45
commit 21b4c591b9
3 changed files with 8 additions and 5 deletions

View File

@ -148,7 +148,8 @@ IF ( (${CMAKE_C_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_C_COMPILER_ID} STREQUAL "
MESSAGE (STATUS "cuda version: ${CUDA_VERSION}")
SET(CUDA_PROPAGATE_HOST_FLAGS OFF)
SET (CUDA_NVCC_FLAGS "-arch=sm_35;-DDEBUG;-std=c++11;-D__wsu;-fmad=false")
#as35: Tesla K40c SET (CUDA_NVCC_FLAGS "-arch=sm_35;-DDEBUG;-std=c++11;-D__wsu;-fmad=false")
SET (CUDA_NVCC_FLAGS "-arch=sm_70; -gencode=arch=compute_70,code=sm_70 -DDEBUG;-std=c++11;-D__wsu;-fmad=false")
SET (CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};${OPENCL_KERNELS}")
IF (NOT STATIC_CUDA)

View File

@ -1,8 +1,9 @@
CMAKE_MINIMUM_REQUIRED (VERSION 2.8)
CMAKE_MINIMUM_REQUIRED (VERSION 3.2)
FIND_PACKAGE(CUDA REQUIRED)
SET (CUDA_NVCC_FLAGS "-arch=sm_30")
#as35: Tesla K40c SET (CUDA_NVCC_FLAGS "-arch=sm_30")
SET (CUDA_NVCC_FLAGS "-arch=sm_70")
SET(LIB_TYPE STATIC)
@ -22,4 +23,4 @@ INCLUDE_DIRECTORIES (
${CMAKE_CURRENT_SOURCE_DIR}
)
CUDA_ADD_LIBRARY(cudadks ${DKS_CUDA_SRCS})
CUDA_ADD_LIBRARY(cudadks ${DKS_CUDA_SRCS})

View File

@ -94,7 +94,8 @@ int CudaChiSquareRuntime::compileProgram(std::string function, bool mlh) {
}
//compile program
const char *opts[] = {"-arch=compute_35", "-fmad=false", ""};
//as35: for Tesla K40c const char *opts[] = {"-arch=compute_35", "-fmad=false", ""};
const char *opts[] = {"-arch=compute_70", "-fmad=false", ""};
int numopts = 2;
if (mlh) {
opts[2] = "-DMLH";