Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add regression test for recursive iterator #1981

Merged
merged 4 commits into from
Sep 7, 2024

Conversation

malfet
Copy link
Contributor

@malfet malfet commented Sep 7, 2024

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

@malfet malfet merged commit bc03cdf into main Sep 7, 2024
2 checks passed
malfet added a commit that referenced this pull request Sep 7, 2024
This reverts commit bc03cdf as trunk
started using std::filesystem again.
malfet added a commit that referenced this pull request Oct 3, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PyTorch 2.5.0 exposes statically linked libstdc++ CXX11 ABI symbols.
2 participants