"git@developer.sourcefind.cn:OpenDAS/dgl.git" did not exist on "c801a164ee6ea189c284ca42f5a06503a8c874be"
Unverified Commit 7d069d62 authored by nv-dlasalle's avatar nv-dlasalle Committed by GitHub
Browse files

Add Ampere support to cmake files (#3031)

* Update cmake to build Ampere

* Fix version check
parent 7176f5f2
...@@ -11,6 +11,9 @@ include(CheckCXXCompilerFlag) ...@@ -11,6 +11,9 @@ include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-std=c++14" SUPPORT_CXX14) check_cxx_compiler_flag("-std=c++14" SUPPORT_CXX14)
set(dgl_known_gpu_archs "35 50 60 70") set(dgl_known_gpu_archs "35 50 60 70")
if (CUDA_VERSION_MAJOR GREATER_EQUAL "11")
set(dgl_known_gpu_archs "${dgl_known_gpu_archs} 80")
endif()
################################################################################################ ################################################################################################
# A function for automatic detection of GPUs installed (if autodetection is enabled) # A function for automatic detection of GPUs installed (if autodetection is enabled)
...@@ -84,7 +87,7 @@ endfunction() ...@@ -84,7 +87,7 @@ endfunction()
# dgl_select_nvcc_arch_flags(out_variable) # dgl_select_nvcc_arch_flags(out_variable)
function(dgl_select_nvcc_arch_flags out_variable) function(dgl_select_nvcc_arch_flags out_variable)
# List of arch names # List of arch names
set(__archs_names "Fermi" "Kepler" "Maxwell" "Pascal" "Volta" "All" "Manual") set(__archs_names "Fermi" "Kepler" "Maxwell" "Pascal" "Volta" "Ampere" "All" "Manual")
set(__archs_name_default "All") set(__archs_name_default "All")
if(NOT CMAKE_CROSSCOMPILING) if(NOT CMAKE_CROSSCOMPILING)
list(APPEND __archs_names "Auto") list(APPEND __archs_names "Auto")
...@@ -121,6 +124,8 @@ function(dgl_select_nvcc_arch_flags out_variable) ...@@ -121,6 +124,8 @@ function(dgl_select_nvcc_arch_flags out_variable)
set(__cuda_arch_bin "60 61") set(__cuda_arch_bin "60 61")
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 "Ampere")
set(__cuda_arch_bin "80")
elseif(${CUDA_ARCH_NAME} STREQUAL "All") elseif(${CUDA_ARCH_NAME} STREQUAL "All")
set(__cuda_arch_bin ${dgl_known_gpu_archs}) set(__cuda_arch_bin ${dgl_known_gpu_archs})
elseif(${CUDA_ARCH_NAME} STREQUAL "Auto") elseif(${CUDA_ARCH_NAME} STREQUAL "Auto")
......
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