Skip to content

Commit 7741ae4

Browse files
committed
Cleanup pybind ops loading.
1 parent edce04b commit 7741ae4

File tree

1 file changed

+2
-2
lines changed
  • src/torchcodec/decoders/_core

1 file changed

+2
-2
lines changed

src/torchcodec/decoders/_core/ops.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ def load_torchcodec_extension():
3434
decoder_library_name = f"libtorchcodec_decoder{ffmpeg_major_version}"
3535
custom_ops_library_name = f"libtorchcodec_custom_ops{ffmpeg_major_version}"
3636
pybind_ops_library_name = f"libtorchcodec_pybind_ops{ffmpeg_major_version}"
37+
pybind_ops_module_name = f"_torchcodec_pybind_ops{ffmpeg_major_version}"
3738
try:
3839
torch.ops.load_library(_get_extension_path(decoder_library_name))
3940
torch.ops.load_library(_get_extension_path(custom_ops_library_name))
40-
torch.ops.load_library(_get_extension_path(pybind_ops_library_name))
4141
spec = importlib.util.spec_from_file_location(
42-
f"_torchcodec_pybind_ops{ffmpeg_major_version}",
42+
pybind_ops_module_name,
4343
_get_extension_path(pybind_ops_library_name),
4444
)
4545
global _pybind_ops

0 commit comments

Comments
 (0)