Revert D30652629: use irange for loops

Test Plan: revert-hammer

Differential Revision:
D30652629 (687c2267d4)

Original commit changeset: 0ae6c4bbbb55

fbshipit-source-id: 5c4f067b584a021c8c9656454d1ee60999600fb3
This commit is contained in:
Xue Li
2021-10-15 15:19:28 -07:00
committed by Facebook GitHub Bot
parent 1e2b2ee5ff
commit 2f099c7555
487 changed files with 21930 additions and 22184 deletions

View File

@ -1,4 +1,3 @@
#include <c10/util/irange.h>
#include <torch/script.h>
#include <torch/cuda.h>
@ -45,7 +44,7 @@ void get_operator_from_registry_and_execute() {
const auto manual = custom_op(torch::ones(5), 2.0, 3);
TORCH_INTERNAL_ASSERT(output.size() == 3);
for (const auto i : c10::irange(output.size())) {
for (size_t i = 0; i < output.size(); ++i) {
TORCH_INTERNAL_ASSERT(output[i].allclose(torch::ones(5) * 2));
TORCH_INTERNAL_ASSERT(output[i].allclose(manual[i]));
}