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
Torchaudio
Commits
5305edef
Commit
5305edef
authored
Oct 16, 2023
by
flyingdown
Browse files
Merge branch '0.13.1-dev' into '0.13.1-dtk-23.10'
修改默认编译器为hipcc See merge request dcutoolkit/deeplearing/torchaudio!1
parents
c1ce24db
e4abf160
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
tools/setup_helpers/extension.py
tools/setup_helpers/extension.py
+5
-1
No files found.
tools/setup_helpers/extension.py
View file @
5305edef
...
...
@@ -7,7 +7,7 @@ from pathlib import Path
import
torch
from
setuptools
import
Extension
from
setuptools.command.build_ext
import
build_ext
from
torch.utils.cpp_extension
import
CUDA_HOME
from
torch.utils.cpp_extension
import
CUDA_HOME
,
ROCM_HOME
__all__
=
[
"get_ext_modules"
,
...
...
@@ -124,6 +124,10 @@ class CMakeBuild(build_ext):
cmake_args
+=
[
f
"-DCMAKE_CUDA_COMPILER='
{
CUDA_HOME
}
/bin/nvcc'"
]
cmake_args
+=
[
f
"-DCUDA_TOOLKIT_ROOT_DIR='
{
CUDA_HOME
}
'"
]
if
platform
.
system
()
!=
"Windows"
and
ROCM_HOME
is
not
None
:
cmake_args
+=
[
f
"-DCMAKE_HIP_COMPILER='
{
ROCM_HOME
}
/bin/hipcc'"
]
cmake_args
+=
[
f
"-DCUDA_TOOLKIT_ROOT_DIR='
{
ROCM_HOME
}
'"
]
# Default to Ninja
if
"CMAKE_GENERATOR"
not
in
os
.
environ
or
platform
.
system
()
==
"Windows"
:
cmake_args
+=
[
"-GNinja"
]
...
...
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