-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add folding for ttir.typecast op #1486
Conversation
1edec60
to
cc9872f
Compare
cc9872f
to
6a2bcaf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good.
// CHECK-LABEL: func.func @cast_fold_add | ||
// CHECK-NOT: typecast | ||
// CHECK: ttnn.add | ||
// CHECK-NOT: typecast |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, did you add this second CHECK-NOT to confirm that no typecast will be inserted by some other pass in the pipeline, and even if it gets inserted it will be folded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added to second CHECK-NOT to verify that we don't have any typecast
op in the entire graph (either before or after ttnn.add op). I see your point that it causes more confusion and some other optimization may add another typecast op in future. So I have removed the second CHECK-NOT statement.
6a2bcaf
to
6ee5109
Compare
6ee5109
to
20bed85
Compare
No description provided.