C2/glow: assign net_pos to a net before applying onnxifi_blacklist_ops (#24262)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/24262
Previously for onnxifi_blacklist_ops option, we figure out the net_pos based on the order of ops in the net. But this logic is wrong if the net already has net_pos assigned and we may end up blacklisting unintended ops. Fix this issue to always assign net_pos before computing any blacklist.
Reviewed By: yinghai
Differential Revision: D16789166
fbshipit-source-id: 2d08a7737d417822f2209adb4dcb24dbb258ff90