Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add regression test for recursive iterator (#1981)
Test plan: ``` % pip install torch==2.4.0; python test/check_binary_symbols.py lib: /home/nshulga/miniconda3/envs/py310-torch/lib/python3.10/site-packages/torch/lib/libtorch_cpu.so num_cxx11_symbols: 0 num_pre_cxx11_symbols: 1966 Traceback (most recent call last): File "/home/nshulga/git/pytorch/builder/test/check_binary_symbols.py", line 97, in <module> main() File "/home/nshulga/git/pytorch/builder/test/check_binary_symbols.py", line 93, in main check_lib_symbols_for_abi_correctness(libtorch_cpu_path, pre_cxx11_abi) File "/home/nshulga/git/pytorch/builder/test/check_binary_symbols.py", line 78, in check_lib_symbols_for_abi_correctness raise RuntimeError(f"Found use of recursive_directory_iterator in pre-CXX11 binaries, see; {rec_iter_symbols}") RuntimeError: Found use of recursive_directory_iterator in pre-CXX11 binaries, see; ['std::filesystem::recursive_directory_iterator::recursion_pending() const', 'std::filesystem::recursive_directory_iterator::depth() const', 'std::filesystem::recursive_directory_iterator::options() const', 'std::filesystem::recursive_directory_iterator::operator*() const', 'std::filesystem::recursive_directory_iterator::disable_recursion_pending()', 'std::filesystem::recursive_directory_iterator::pop(std::error_code&)', 'std::filesystem::recursive_directory_iterator::pop()', 'std::filesystem::recursive_directory_iterator::pop() [clone .cold]', 'std::filesystem::recursive_directory_iterator::increment(std::error_code&)', 'std::filesystem::recursive_directory_iterator::increment(std::error_code&) [clone .cold]', 'std::filesystem::recursive_directory_iterator::recursive_directory_iterator(std::filesystem::path const&, std::filesystem::directory_options, std::error_code*)', 'std::filesystem::recursive_directory_iterator::recursive_directory_iterator(std::filesystem::path const&, std::filesystem::directory_options, std::error_code*)', 'std::filesystem::recursive_directory_iterator::recursive_directory_iterator(std::filesystem::path const&, std::filesystem::directory_options, std::error_code*) [clone .cold]', 'std::filesystem::recursive_directory_iterator::~recursive_directory_iterator()', 'std::filesystem::recursive_directory_iterator::~recursive_directory_iterator()', 'std::filesystem::recursive_directory_iterator::operator=(std::filesystem::recursive_directory_iterator&&)', 'std::filesystem::recursive_directory_iterator::operator=(std::filesystem::recursive_directory_iterator const&)', 'std::filesystem::recursive_directory_iterator::operator++()', 'std::filesystem::recursive_directory_iterator::operator++() [clone .cold]'] ``` Fixes pytorch/pytorch#133437
- Loading branch information