Skip to content

Commit 9aa5c3d

Browse files
committed
Debug load_lib
1 parent bceedf3 commit 9aa5c3d

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/torchaudio/_extension/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@
2121
]
2222

2323

24-
if os.name == "nt" and (3, 8) <= sys.version_info < (3, 9):
24+
if os.name == "nt": # and (3, 8) <= sys.version_info < (3, 9):
2525
_init_dll_path()
2626

2727
# When the extension module is built, we initialize it.
2828
# In case of an error, we do not catch the failure as it suggests there is something
2929
# wrong with the installation.
3030
_IS_TORCHAUDIO_EXT_AVAILABLE = _load_lib("_torchaudio")
31+
assert _IS_TORCHAUDIO_EXT_AVAILABLE
3132
_IS_ALIGN_AVAILABLE = False
3233
if _IS_TORCHAUDIO_EXT_AVAILABLE:
3334
if not _load_lib("libtorchaudio"):

src/torchaudio/_extension/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def _load_lib(lib: str) -> bool:
5353
If a dependency is missing, then users have to install it.
5454
"""
5555
path = _get_lib_path(lib)
56+
print(f'_load_lib: {lib=} {path=}')
5657
if not path.exists():
5758
return False
5859
torch.ops.load_library(path)

0 commit comments

Comments
 (0)