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
tianlh
LightGBM-DCU
Commits
c9de57b0
Unverified
Commit
c9de57b0
authored
Feb 02, 2025
by
Nikita Titov
Committed by
GitHub
Feb 02, 2025
Browse files
[CUDA] fix setting of CUDA architectures and enable support for NVIDIA Blackwell (#6812)
parent
f2b959cd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
10 deletions
+17
-10
.ci/check-python-dists.sh
.ci/check-python-dists.sh
+1
-1
.github/workflows/cuda.yml
.github/workflows/cuda.yml
+1
-1
CMakeLists.txt
CMakeLists.txt
+15
-8
No files found.
.ci/check-python-dists.sh
View file @
c9de57b0
...
...
@@ -32,7 +32,7 @@ if [ "$PY_MINOR_VER" -gt 7 ]; then
--inspect
\
--ignore
'compiled-objects-have-debug-symbols'
\
--ignore
'distro-too-large-compressed'
\
--max-allowed-size-uncompressed
'1
0
0M'
\
--max-allowed-size-uncompressed
'1
2
0M'
\
--max-allowed-files
800
\
"
$(
echo
"
${
DIST_DIR
}
"
/
*
)
"
||
exit
1
elif
{
test
"
$(
uname
-m
)
"
=
"aarch64"
;
}
;
then
...
...
.github/workflows/cuda.yml
View file @
c9de57b0
...
...
@@ -86,7 +86,7 @@ jobs:
-
method
:
wheel
compiler
:
gcc
python_version
:
"
3.11"
cuda_version
:
"
12.
6.1
"
cuda_version
:
"
12.
8.0
"
linux_version
:
"
ubuntu22.04"
task
:
cuda
-
method
:
source
...
...
CMakeLists.txt
View file @
c9de57b0
...
...
@@ -224,21 +224,28 @@ if(USE_CUDA)
# reference for mapping of CUDA toolkit component versions to supported architectures ("compute capabilities"):
# https://en.wikipedia.org/wiki/CUDA#GPUs_supported
set
(
CUDA_ARCHS
"60"
"61"
"62"
"70"
"75"
)
if
(
CUDA_VERSION VERSION_GREATER_EQUAL
"110"
)
if
(
CUDA
Toolkit
_VERSION VERSION_GREATER_EQUAL
"11
.
0"
)
list
(
APPEND CUDA_ARCHS
"80"
)
endif
()
if
(
CUDA_VERSION VERSION_GREATER_EQUAL
"111"
)
if
(
CUDA
Toolkit
_VERSION VERSION_GREATER_EQUAL
"11
.
1"
)
list
(
APPEND CUDA_ARCHS
"86"
)
endif
()
if
(
CUDA_VERSION VERSION_GREATER_EQUAL
"115"
)
if
(
CUDA
Toolkit
_VERSION VERSION_GREATER_EQUAL
"11
.
5"
)
list
(
APPEND CUDA_ARCHS
"87"
)
endif
()
if
(
CUDA_VERSION VERSION_GREATER_EQUAL
"118"
)
if
(
CUDA
Toolkit
_VERSION VERSION_GREATER_EQUAL
"11
.
8"
)
list
(
APPEND CUDA_ARCHS
"89"
)
list
(
APPEND CUDA_ARCHS
"90"
)
endif
()
if
(
CUDAToolkit_VERSION VERSION_GREATER_EQUAL
"12.8"
)
list
(
APPEND CUDA_ARCHS
"100"
)
list
(
APPEND CUDA_ARCHS
"120"
)
endif
()
# Generate PTX for the most recent architecture for forwards compatibility
list
(
POP_BACK CUDA_ARCHS CUDA_LAST_SUPPORTED_ARCH
)
list
(
APPEND CUDA_ARCHS
"
${
CUDA_LAST_SUPPORTED_ARCH
}
+PTX"
)
list
(
TRANSFORM CUDA_ARCHS APPEND
"-real"
)
list
(
APPEND CUDA_ARCHS
"
${
CUDA_LAST_SUPPORTED_ARCH
}
-real"
"
${
CUDA_LAST_SUPPORTED_ARCH
}
-virtual"
)
message
(
STATUS
"CUDA_ARCHITECTURES:
${
CUDA_ARCHS
}
"
)
if
(
USE_DEBUG
)
set
(
CMAKE_CUDA_FLAGS
"
${
CMAKE_CUDA_FLAGS
}
-g"
)
else
()
...
...
@@ -567,14 +574,14 @@ if(USE_CUDA)
set_target_properties
(
lightgbm_objs
PROPERTIES
CUDA_ARCHITECTURES
${
CUDA_ARCHS
}
CUDA_ARCHITECTURES
"
${
CUDA_ARCHS
}
"
CUDA_SEPARABLE_COMPILATION ON
)
set_target_properties
(
_lightgbm
PROPERTIES
CUDA_ARCHITECTURES
${
CUDA_ARCHS
}
CUDA_ARCHITECTURES
"
${
CUDA_ARCHS
}
"
CUDA_RESOLVE_DEVICE_SYMBOLS ON
)
...
...
@@ -582,7 +589,7 @@ if(USE_CUDA)
set_target_properties
(
lightgbm
PROPERTIES
CUDA_ARCHITECTURES
${
CUDA_ARCHS
}
CUDA_ARCHITECTURES
"
${
CUDA_ARCHS
}
"
CUDA_RESOLVE_DEVICE_SYMBOLS ON
)
endif
()
...
...
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