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
f0f424f7
Unverified
Commit
f0f424f7
authored
Apr 10, 2024
by
Muhammed Fatih BALIN
Committed by
GitHub
Apr 10, 2024
Browse files
[GraphBolt][CUDA] Better `TORCH_CUDA_ARCH_LIST` initialization. (#7293)
parent
c264a410
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
graphbolt/build.sh
graphbolt/build.sh
+13
-1
No files found.
graphbolt/build.sh
View file @
f0f424f7
...
@@ -16,7 +16,19 @@ fi
...
@@ -16,7 +16,19 @@ fi
# TORCH_CUDA_ARCH_LIST and we need to at least compile for Volta. Until
# TORCH_CUDA_ARCH_LIST and we need to at least compile for Volta. Until
# https://github.com/NVIDIA/cccl/issues/1083 is resolved, we need to compile the
# https://github.com/NVIDIA/cccl/issues/1083 is resolved, we need to compile the
# cuda/extension folder with Volta+ CUDA architectures.
# cuda/extension folder with Volta+ CUDA architectures.
CMAKE_FLAGS
=
"-DCUDA_TOOLKIT_ROOT_DIR=
$CUDA_TOOLKIT_ROOT_DIR
-DUSE_CUDA=
$USE_CUDA
-DGPU_CACHE_BUILD_DIR=
$BINDIR
-DTORCH_CUDA_ARCH_LIST=Volta"
TORCH_CUDA_ARCH_LIST
=
"Volta"
if
!
[[
-z
"
${
CUDAARCHS
}
"
]]
;
then
# The architecture list is passed as an environment variable, we set
# TORCH_CUDA_ARCH_LIST to the latest architecture.
CUDAARCHSARR
=(
${
CUDAARCHS
//;/
}
)
LAST_ARCHITECTURE
=
${
CUDAARCHSARR
[-1]
}
# TORCH_CUDA_ARCH_LIST has to be at least 70 to override Volta default.
if
((
$LAST_ARCHITECTURE
>=
70
))
;
then
# Convert "75" to "7.5".
TORCH_CUDA_ARCH_LIST
=
${
LAST_ARCHITECTURE
:0:-1
}
'.'
${
LAST_ARCHITECTURE
:
-1
}
fi
fi
CMAKE_FLAGS
=
"-DCUDA_TOOLKIT_ROOT_DIR=
$CUDA_TOOLKIT_ROOT_DIR
-DUSE_CUDA=
$USE_CUDA
-DGPU_CACHE_BUILD_DIR=
$BINDIR
-DTORCH_CUDA_ARCH_LIST=
$TORCH_CUDA_ARCH_LIST
"
echo
$CMAKE_FLAGS
echo
$CMAKE_FLAGS
if
[
$#
-eq
0
]
;
then
if
[
$#
-eq
0
]
;
then
...
...
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