-
Notifications
You must be signed in to change notification settings - Fork 72
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
lhlo-copy-removal pass crash #1
Comments
Thanks, Uday. This issue is going to be fixed in general mlir::CopyRemoval pass and it's going to be downstream to Tensorflow soon. |
@dfki-ehna I happened to try out the upstream
|
@bondhugula Thanks for your comment. Actually, in this case, despite the fact that Copy should be removed but copy-removal is not able to remove Copy. Since we didn't have alias analysis nor information on whether the arguments are output buffers or inputs, we tried to be conservative in the copy removal. So, please consider this case where Copy removal makes the logic of the program wrong:
Here, we cannot get rid of temp, since the content of %arg1 would then change for the second exp. Therefore, in the implementation of copy removal for the case "reusing target of the copy as source", we have this line of code for pruning:
which means if the target value has any users between source defining and copy operations, this removal should not occur. However, the constraint such as this would soon be removed from Copy-Removal by implementing better analysis for it. |
I'm not sure whether issues can be posted on this repo. If not, I can move it to tensorflow proper.
This can be reproduced with a recent commit (d4dcba1340f363762cc6003d4ed1f4db2df61858) and in all certainty with the trunk as well. The input isn't really the expected one for this pass, but this is a bug apparently stemming from an assumption on the input. A check / bail out would have been fine for example.
Input:
@dfki-ehna, @joker-eph
The text was updated successfully, but these errors were encountered: