"docs/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "efc48da23bd342ca79a79def02649b1975393ea0"
Unverified Commit a1513f7c authored by Quan (Andy) Gan's avatar Quan (Andy) Gan Committed by GitHub
Browse files

update known gpu arch list (#629)

parent 411bcd7e
...@@ -10,6 +10,8 @@ endif() ...@@ -10,6 +10,8 @@ endif()
include(CheckCXXCompilerFlag) include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-std=c++11" SUPPORT_CXX11) check_cxx_compiler_flag("-std=c++11" SUPPORT_CXX11)
set(dgl_known_gpu_archs "30 35 50 60 70")
################################################################################################ ################################################################################################
# A function for automatic detection of GPUs installed (if autodetection is enabled) # A function for automatic detection of GPUs installed (if autodetection is enabled)
# Usage: # Usage:
...@@ -68,8 +70,8 @@ set(CUDA_gpu_detect_output "") ...@@ -68,8 +70,8 @@ set(CUDA_gpu_detect_output "")
endif() endif()
if(NOT CUDA_gpu_detect_output) if(NOT CUDA_gpu_detect_output)
message(WARNING "Automatic GPU detection failed. Building for all known architectures (${mshadow_known_gpu_archs}).") message(WARNING "Automatic GPU detection failed. Building for all known architectures (${dgl_known_gpu_archs}).")
set(${out_variable} ${mshadow_known_gpu_archs} PARENT_SCOPE) set(${out_variable} ${dgl_known_gpu_archs} PARENT_SCOPE)
else() else()
set(${out_variable} ${CUDA_gpu_detect_output} PARENT_SCOPE) set(${out_variable} ${CUDA_gpu_detect_output} PARENT_SCOPE)
endif() endif()
...@@ -101,7 +103,7 @@ function(dgl_select_nvcc_arch_flags out_variable) ...@@ -101,7 +103,7 @@ function(dgl_select_nvcc_arch_flags out_variable)
endif() endif()
if(${CUDA_ARCH_NAME} STREQUAL "Manual") if(${CUDA_ARCH_NAME} STREQUAL "Manual")
set(CUDA_ARCH_BIN ${mshadow_known_gpu_archs} CACHE STRING "Specify 'real' GPU architectures to build binaries for, BIN(PTX) format is supported") set(CUDA_ARCH_BIN ${dgl_known_gpu_archs} CACHE STRING "Specify 'real' GPU architectures to build binaries for, BIN(PTX) format is supported")
set(CUDA_ARCH_PTX "50" CACHE STRING "Specify 'virtual' PTX architectures to build PTX intermediate code for") set(CUDA_ARCH_PTX "50" CACHE STRING "Specify 'virtual' PTX architectures to build PTX intermediate code for")
mark_as_advanced(CUDA_ARCH_BIN CUDA_ARCH_PTX) mark_as_advanced(CUDA_ARCH_BIN CUDA_ARCH_PTX)
else() else()
...@@ -120,7 +122,7 @@ function(dgl_select_nvcc_arch_flags out_variable) ...@@ -120,7 +122,7 @@ function(dgl_select_nvcc_arch_flags out_variable)
elseif(${CUDA_ARCH_NAME} STREQUAL "Volta") elseif(${CUDA_ARCH_NAME} STREQUAL "Volta")
set(__cuda_arch_bin "70") set(__cuda_arch_bin "70")
elseif(${CUDA_ARCH_NAME} STREQUAL "All") elseif(${CUDA_ARCH_NAME} STREQUAL "All")
set(__cuda_arch_bin ${mshadow_known_gpu_archs}) set(__cuda_arch_bin ${dgl_known_gpu_archs})
elseif(${CUDA_ARCH_NAME} STREQUAL "Auto") elseif(${CUDA_ARCH_NAME} STREQUAL "Auto")
dgl_detect_installed_gpus(__cuda_arch_bin) dgl_detect_installed_gpus(__cuda_arch_bin)
else() # (${CUDA_ARCH_NAME} STREQUAL "Manual") else() # (${CUDA_ARCH_NAME} STREQUAL "Manual")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment