--- torch/testing/_internal/torchbind_impls.py.orig 2026-07-08 17:44:38 UTC +++ torch/testing/_internal/torchbind_impls.py @@ -179,6 +179,8 @@ def load_torchbind_test_lib(): lib_file_path = find_library_location("torchbind_test.dll") else: lib_file_path = find_library_location("libtorchbind_test.so") + if not Path(str(lib_file_path)).exists(): + raise unittest.SkipTest(f"libtorchbind_test library not found (C++ test library not built)") torch.ops.load_library(str(lib_file_path))