Fix infinite loop bug in minimizer (#38507)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/38507
With `--merge_fp32_inputs_into_fp16` we added some ops to the net with out net_pos, this makes the cardinality of blacklist pos smaller than number of op in the net. Previously, the updateInternalState() function of minimizer will just enter infinite loop. This diff fixed it by changing the loop condition.
Reviewed By: tracelogfb
Differential Revision: D21578777
fbshipit-source-id: 0d5373fa0a417ded1c80a2dc03248c07b1e0a320