Skip to content

[mlir][utils] Update generate-test-checks.py #136721

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion mlir/utils/generate-test-checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,13 @@ def main():
help="Names to be used in FileCheck regular expression to represent "
"attributes in the order they are defined. Separate names with commas,"
"commas, and leave empty entries for default names (e.g.: 'MAP0,,,MAP1')")
parser.add_argument(
"--strict_name_re",
type=bool,
default=False,
help="Set to true to use stricter regex for CHECK-SAME directives. "
"Use when Greedy matching causes issues with the generic '.*'",
)

args = parser.parse_args()

Expand Down Expand Up @@ -406,7 +413,7 @@ def main():

# Process the rest of the line.
output_line += process_line(
[argument], variable_namer, strict_name_re=True
[argument], variable_namer, args.strict_name_re
)

# Append the output line.
Expand Down
Loading