Skip to content

Commit

Permalink
Revert "Add regression test for recursive iterator (#1981)"
Browse files Browse the repository at this point in the history
This reverts commit bc03cdf as trunk
started using std::filesystem again.
  • Loading branch information
malfet committed Sep 7, 2024
1 parent bc03cdf commit 1cdd6fa
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions test/check_binary_symbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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())
Expand Down

0 comments on commit 1cdd6fa

Please sign in to comment.