Unverified Commit 56a010b0 authored by Yi Zhang's avatar Yi Zhang Committed by GitHub
Browse files

set libtorch audio suffix as pyd on Windows (#1788)

parent c69955c6
......@@ -11,7 +11,7 @@ def _init_extension():
warnings.warn('torchaudio C++ extension is not available.')
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}'
# In case `torchaudio` is deployed with `pex` format, this file does not exist.
# In this case, we expect that `libtorchaudio` is available somewhere
......
......@@ -90,6 +90,10 @@ if(USE_CUDA)
)
endif()
if (MSVC)
set_target_properties(libtorchaudio PROPERTIES SUFFIX ".pyd")
endif(MSVC)
install(
TARGETS libtorchaudio
LIBRARY DESTINATION lib
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment