[Lint] Add check to prevent usage of #include <regex>#16412
Merged
tqchen merged 1 commit intoapache:mainfrom Mar 10, 2024
Merged
[Lint] Add check to prevent usage of #include <regex>#16412tqchen merged 1 commit intoapache:mainfrom
tqchen merged 1 commit intoapache:mainfrom
Conversation
Contributor
Author
|
This rule is currently implemented in terms of |
Contributor
Author
|
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
Contributor
Author
|
Merged from main to PR branch, to resolve CI breakage that was fixed in #16546. |
1ece1ad to
cbf613d
Compare
Contributor
Author
|
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
tqchen
approved these changes
Mar 10, 2024
Lunderberg
added a commit
to Lunderberg/tvm
that referenced
this pull request
Mar 12, 2024
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
thaisacs
pushed a commit
to thaisacs/tvm
that referenced
this pull request
Apr 3, 2024
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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