Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
7d069d62
Unverified
Commit
7d069d62
authored
Jun 16, 2021
by
nv-dlasalle
Committed by
GitHub
Jun 16, 2021
Browse files
Add Ampere support to cmake files (#3031)
* Update cmake to build Ampere * Fix version check
parent
7176f5f2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
cmake/modules/CUDA.cmake
cmake/modules/CUDA.cmake
+6
-1
No files found.
cmake/modules/CUDA.cmake
View file @
7d069d62
...
@@ -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"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment