Revert D31705359: use irange for loops 8
Test Plan: revert-hammer
Differential Revision:
D31705359 (https://github.com/pytorch/pytorch/commit/17e52004410453bcc490087917ca163efd819695)
Original commit changeset: c9ea2fbc0f9c
fbshipit-source-id: 08fff2d12beca953ad30dd0baabf86e39ac84f14