diff --git a/test/check_binary_symbols.py b/test/check_binary_symbols.py index e857482ba..d96e8f8f2 100755 --- a/test/check_binary_symbols.py +++ b/test/check_binary_symbols.py @@ -58,7 +58,6 @@ def _grep_symbols(symbols: List[Tuple[str, str, str]], patterns: List[Any]) -> L tasks = [executor.submit(_grep_symbols, all_symbols[i * chunk_size : (i + 1) * chunk_size], patterns) for i in range(num_workers)] return sum((x.result() for x in tasks), []) - def check_lib_symbols_for_abi_correctness(lib: str, pre_cxx11_abi: bool = True) -> None: print(f"lib: {lib}") cxx11_symbols = grep_symbols(lib, LIBTORCH_CXX11_PATTERNS) @@ -72,17 +71,12 @@ def check_lib_symbols_for_abi_correctness(lib: str, pre_cxx11_abi: bool = True) raise RuntimeError(f"Found cxx11 symbols, but there shouldn't be any, see: {cxx11_symbols[:100]}") if num_pre_cxx11_symbols < 1000: raise RuntimeError("Didn't find enough pre-cxx11 symbols.") - # Check for no recursive iterators, regression test for https://github.com/pytorch/pytorch/issues/133437 - rec_iter_symbols = grep_symbols(lib, [re.compile("std::filesystem::recursive_directory_iterator.*")]) - if len(rec_iter_symbols) > 0: - raise RuntimeError(f"Found use of recursive_directory_iterator in pre-CXX11 binaries, see; {rec_iter_symbols}") else: if num_pre_cxx11_symbols > 0: raise RuntimeError(f"Found pre-cxx11 symbols, but there shouldn't be any, see: {pre_cxx11_symbols[:100]}") if num_cxx11_symbols < 100: raise RuntimeError("Didn't find enought cxx11 symbols") - def main() -> None: if os.getenv("PACKAGE_TYPE") == "libtorch": install_root = Path(os.getcwd())