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
56a010b0
Unverified
Commit
56a010b0
authored
Sep 24, 2021
by
Yi Zhang
Committed by
GitHub
Sep 23, 2021
Browse files
set libtorch audio suffix as pyd on Windows (#1788)
parent
c69955c6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
torchaudio/_extension.py
torchaudio/_extension.py
+1
-1
torchaudio/csrc/CMakeLists.txt
torchaudio/csrc/CMakeLists.txt
+4
-0
No files found.
torchaudio/_extension.py
View file @
56a010b0
...
@@ -11,7 +11,7 @@ def _init_extension():
...
@@ -11,7 +11,7 @@ def _init_extension():
warnings
.
warn
(
'torchaudio C++ extension is not available.'
)
warnings
.
warn
(
'torchaudio C++ extension is not available.'
)
return
return
suffix
=
'
dll
'
if
os
.
name
==
'nt'
else
'so'
suffix
=
'
pyd
'
if
os
.
name
==
'nt'
else
'so'
path
=
Path
(
__file__
).
parent
/
'lib'
/
f
'libtorchaudio.
{
suffix
}
'
path
=
Path
(
__file__
).
parent
/
'lib'
/
f
'libtorchaudio.
{
suffix
}
'
# In case `torchaudio` is deployed with `pex` format, this file does not exist.
# In case `torchaudio` is deployed with `pex` format, this file does not exist.
# In this case, we expect that `libtorchaudio` is available somewhere
# In this case, we expect that `libtorchaudio` is available somewhere
...
...
torchaudio/csrc/CMakeLists.txt
View file @
56a010b0
...
@@ -90,6 +90,10 @@ if(USE_CUDA)
...
@@ -90,6 +90,10 @@ if(USE_CUDA)
)
)
endif
()
endif
()
if
(
MSVC
)
set_target_properties
(
libtorchaudio PROPERTIES SUFFIX
".pyd"
)
endif
(
MSVC
)
install
(
install
(
TARGETS libtorchaudio
TARGETS libtorchaudio
LIBRARY DESTINATION lib
LIBRARY DESTINATION lib
...
...
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