From 10a996cb4dce5d514f09fd0d49ffcd3b88869a28 Mon Sep 17 00:00:00 2001 From: "Gao, Xiang" Date: Mon, 11 Jul 2022 02:23:21 -0400 Subject: [PATCH] Remove redundant check in schedulePointwise (#1810) --- .../jit/codegen/cuda/scheduler/pointwise.cpp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/torch/csrc/jit/codegen/cuda/scheduler/pointwise.cpp b/torch/csrc/jit/codegen/cuda/scheduler/pointwise.cpp index 75172a4357331..32943be72d440 100644 --- a/torch/csrc/jit/codegen/cuda/scheduler/pointwise.cpp +++ b/torch/csrc/jit/codegen/cuda/scheduler/pointwise.cpp @@ -637,22 +637,6 @@ void schedulePointwise(Fusion* fusion, const PointwiseParams& params) { reference_tv != nullptr, "Could not find a fully broadcasted output to reference schedule on."); - IterDomain* inner_most_id = nullptr; - for (auto it = reference_tv->domain()->domain().rbegin(); - it != reference_tv->domain()->domain().rend(); - it++) { - if ((*it)->isReduction()) { - continue; - } - if ((*it)->isBroadcast() && inner_most_id == nullptr) { - inner_most_id = *it; - } - inner_most_id = *it; - break; - } - - TORCH_INTERNAL_ASSERT(inner_most_id != nullptr); - // Caches of inputs std::vector cached_inputs;