On some large graphs Glow is not able to create enough unique ids and crashes here
https://github.com/pytorch/glow/blob/1a37b09fe60f20295e86af28407bcf5ddc7128ce/lib/Graph/Graph.cpp#L437
Because all calls to createDeallocActivationInst are given the same initial name "dealloc"
https://github.com/pytorch/glow/blob/1a37b09fe60f20295e86af28407bcf5ddc7128ce/lib/IR/IRBuilder.cpp#L51 and Module::uniqueName() will only try 10,000 unique names before giving up.
https://github.com/pytorch/glow/blob/1a37b09fe60f20295e86af28407bcf5ddc7128ce/lib/Graph/Graph.cpp#L427
We could increase this from 10,000 to 100,000 or something like that or maybe we could try to come up with more unique names that a static "dealloc".
Activation names should be unique, so we could associate "dealloc" with the corresponding "alloc": "dealloc." + AA->getName()
auto close did not work :(
Most helpful comment
Activation names should be unique, so we could associate "dealloc" with the corresponding "alloc": "dealloc." + AA->getName()