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

[mlir2FileCheck tool] handle multiple output arguments #2946

Merged
merged 3 commits into from
Sep 19, 2024

Conversation

tungld
Copy link
Collaborator

@tungld tungld commented Sep 19, 2024

The python script mlir2FileCheck does not handle multiple output arguments, for example, it prints out:

// CHECK:           [[VAR_Out_]], [[VAR_RecScale_]], [[VAR_Offset_:%.+]] = ....

where only the last output has :%.+. The correct one would be

// CHECK:           [[VAR_Out_:%.+]], [[VAR_RecScale_:%.+]], [[VAR_Offset_:%.+]] = "

This fixes the issue by defining a new regex that captures a repeated group that contains all output arguments, then parses them.

Signed-off-by: Tung D. Le <tung@jp.ibm.com>
Signed-off-by: Tung D. Le <tung@jp.ibm.com>
Copy link
Collaborator

@AlexandreEichenberger AlexandreEichenberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Big thanks, I was always manually editing the multiple output operations. This is much better.

@AlexandreEichenberger AlexandreEichenberger merged commit bf905d1 into onnx:main Sep 19, 2024
7 checks passed
@jenkins-droid
Copy link
Collaborator

Jenkins Linux amd64 Build #15667 [push] [mlir2FileCheck tool] ha... started at 13:49

@jenkins-droid
Copy link
Collaborator

Jenkins Linux ppc64le Build #14697 [push] [mlir2FileCheck tool] ha... started at 15:01

@jenkins-droid
Copy link
Collaborator

Jenkins Linux s390x Build #15670 [push] [mlir2FileCheck tool] ha... started at 14:49

@jenkins-droid
Copy link
Collaborator

Jenkins Linux amd64 Build #15667 [push] [mlir2FileCheck tool] ha... passed after 1 hr 8 min

@jenkins-droid
Copy link
Collaborator

Jenkins Linux s390x Build #15670 [push] [mlir2FileCheck tool] ha... passed after 1 hr 28 min

@jenkins-droid
Copy link
Collaborator

Jenkins Linux ppc64le Build #14697 [push] [mlir2FileCheck tool] ha... passed after 2 hr 2 min

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.

3 participants