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

[TEST] Use LABEL scopes in lit tests #3293

Merged
merged 1 commit into from
Mar 6, 2024
Merged

Conversation

gflegar
Copy link
Collaborator

@gflegar gflegar commented Mar 6, 2024

It's quite easy to unexpectedly use a match from a different CHECK-LABEL in a lit test, which is likely not what the author intended.

Prevent this from happening by invoking FileCheck with variable scopes enabled (and fix the failures detected this way). This also makes the file check use in Triton consistent with upstream MLIR.

@gflegar gflegar requested a review from ptillet as a code owner March 6, 2024 15:16
It's quite easy to unexpectedly use a match from a different
CHECK-LABEL in a lit test, which is likely not what the author
intended.

Prevent this from happening by invoking FileCheck with variable scopes
enabled (and fix the failures detected this way). This also makes the
file check use in Triton consistent with upstream MLIR.
@gflegar
Copy link
Collaborator Author

gflegar commented Mar 6, 2024

Note: the actual issue that I detected with this was the use of CONSTANT_0 and CONSTANT_1 here, but that got fixed in the meantime.

@ThomasRaoux ThomasRaoux merged commit 4650e07 into triton-lang:main Mar 6, 2024
4 checks passed
@jlebar
Copy link
Collaborator

jlebar commented Mar 6, 2024

This is a good change, thanks Goran.

htyu pushed a commit to htyu/triton that referenced this pull request Mar 20, 2024
It's quite easy to unexpectedly use a match from a different CHECK-LABEL
in a lit test, which is likely not what the author intended.

Prevent this from happening by invoking FileCheck with variable scopes
enabled (and fix the failures detected this way). This also makes the
file check use in Triton consistent with upstream MLIR.
binarman pushed a commit to binarman/triton that referenced this pull request Apr 2, 2024
It's quite easy to unexpectedly use a match from a different CHECK-LABEL
in a lit test, which is likely not what the author intended.

Prevent this from happening by invoking FileCheck with variable scopes
enabled (and fix the failures detected this way). This also makes the
file check use in Triton consistent with upstream MLIR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants