Skip to content

Conversation

hlu1
Copy link
Contributor

@hlu1 hlu1 commented Jun 27, 2020

Summary: The original implementation of RemoveOpsByType is pretty buggy and does not remove all instances of the ops that should be removed. It's also quite complicated and hard to modify. I reimplemented it by first converting the graph to its SSA form. The algorithm is quite simple once the graph is in SSA form. It's very similar to constant propagation with a few modifications. The hardest part is to deal with the case of removing an op with the output being an output of the predict net, because that output has to be preserved.

Reviewed By: yinghai

Differential Revision: D22220798

Summary: The original implementation of RemoveOpsByType is pretty buggy and does not remove all instances of the ops that should be removed. It's also quite complicated and hard to modify. I reimplemented it by first converting the graph to its SSA form. The algorithm is quite simple once the graph is in SSA form. It's very similar to constant propagation with a few modifications. The hardest part is to deal with the case of removing an op with the output being an output of the predict net, because that output has to be preserved.

Reviewed By: yinghai

Differential Revision: D22220798

fbshipit-source-id: 9c35312bd096525e9335fb0bc745b921226dec1c
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D22220798

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 59294fb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants