-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Lint] Add check to prevent usage of #include <regex> #16412
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
Conversation
|
This rule is currently implemented in terms of |
|
The PR #16465 exposes a PackedFunc wrapper for Python's regex matching. The limited functionality it has, checking for a match without returning any extracted results, is sufficient for all existing uses of |
ed1ac32 to
67be0c1
Compare
|
Merged from main to PR branch, to resolve CI breakage that was fixed in #16546. |
1ece1ad to
cbf613d
Compare
|
Rebased this PR onto main, in order to update the stale CI results. |
cbf613d to
d2c3a9f
Compare
Currently, the pytorch wheels available through `pip install` use the pre-C++11 ABI by setting `-DUSE_CXX11_ABI=0` [0]. If TVM were to user the pre-C++11 ABI, this would cause breakages with dynamically-linked LLVM environments. This commit adds a lint check to search for use of `#include <regex>` in any C++ files. Use of this header should be avoided, as its implementation is not supported by gcc's dual ABI. This ABI incompatibility results in runtime errors either when `std::regex` is called from TVM, or when `std::regex` is called from pytorch, depending on which library was loaded first. This restriction can be removed when a version of pytorch compiled using `-DUSE_CXX11_ABI=1` is available from PyPI. [0] pytorch/pytorch#51039
d2c3a9f to
555f41c
Compare
Currently, the pytorch wheels available through `pip install` use the pre-C++11 ABI by setting `-DUSE_CXX11_ABI=0` [0]. If TVM were to user the pre-C++11 ABI, this would cause breakages with dynamically-linked LLVM environments. This commit adds a lint check to search for use of `#include <regex>` in any C++ files. Use of this header should be avoided, as its implementation is not supported by gcc's dual ABI. This ABI incompatibility results in runtime errors either when `std::regex` is called from TVM, or when `std::regex` is called from pytorch, depending on which library was loaded first. This restriction can be removed when a version of pytorch compiled using `-DUSE_CXX11_ABI=1` is available from PyPI. [0] pytorch/pytorch#51039
Currently, the pytorch wheels available through `pip install` use the pre-C++11 ABI by setting `-DUSE_CXX11_ABI=0` [0]. If TVM were to user the pre-C++11 ABI, this would cause breakages with dynamically-linked LLVM environments. This commit adds a lint check to search for use of `#include <regex>` in any C++ files. Use of this header should be avoided, as its implementation is not supported by gcc's dual ABI. This ABI incompatibility results in runtime errors either when `std::regex` is called from TVM, or when `std::regex` is called from pytorch, depending on which library was loaded first. This restriction can be removed when a version of pytorch compiled using `-DUSE_CXX11_ABI=1` is available from PyPI. [0] pytorch/pytorch#51039
Currently, the pytorch wheels available through
pip installuse the pre-C++11 ABI by setting-DUSE_CXX11_ABI=0[0]. If TVM were to user the pre-C++11 ABI, this would cause breakages with dynamically-linked LLVM environments.This commit adds a lint check to search for use of
#include <regex>in any C++ files. Use of this header should be avoided, as its implementation is not supported by gcc's dual ABI. This ABI incompatibility results in runtime errors either whenstd::regexis called from TVM, or whenstd::regexis called from pytorch, depending on which library was loaded first.This restriction can be removed when a version of pytorch compiled using
-DUSE_CXX11_ABI=1is available from PyPI.[0] pytorch/pytorch#51039