From b67c44241dd8fe76db81434244c369f20ccd1f02 Mon Sep 17 00:00:00 2001 From: Jared Roesch Date: Wed, 29 May 2019 12:57:12 -0700 Subject: [PATCH] Remove dead code --- src/relay/pass/type_infer.cc | 44 ------------------------------------ 1 file changed, 44 deletions(-) diff --git a/src/relay/pass/type_infer.cc b/src/relay/pass/type_infer.cc index b2bc12503c064..c6a038153c515 100644 --- a/src/relay/pass/type_infer.cc +++ b/src/relay/pass/type_infer.cc @@ -609,50 +609,6 @@ class TypeInferencer : private ExprFunctor, return TupleTypeNode::make({}); } - // void ApplyTypeHints() { - // for (auto hint : hint_map_) { - // auto expr = hint.first; - // auto hints = hint.second; - // LOG(INFO) << "type hint processing: " << expr; - // // Each hint represents a possible type - // // for the expression. - // // - // // In order to unify types we must - // // split all concretete type information - // // to construct the most general type. - // // - // // We will then unify the result with - // // any hint types which are non-concrete. - // std::vector concrete_types; - // std::vector to_unify; - // for (auto ty : hints) { - // auto rty = solver_.Resolve(ty); - // if (rty.as() != nullptr) { - // to_unify.push_back(rty); - // } else { - // concrete_types.push_back(Downcast(rty)); - // } - // } - - // std::cout << "above generalize"; - // // Add the generalized shape. - // Type general_shape = GeneralizeShape(concrete_types); - // std::cout << "Generalized Shape: " << general_shape; - // for (auto ty : to_unify) { - // CHECK(general_shape.defined()); - // general_shape = Unify(general_shape, ty, expr); - // } - - // auto it = type_map_.find(expr); - // CHECK(it != type_map_.end()); - // auto rtype = solver_.Resolve(it->second.checked_type); - // if (rtype.as() == nullptr) { - // it->second.checked_type = general_shape; - // } else { - // it->second.checked_type = Unify(rtype, general_shape, expr); - // } - // } - // } void Solve() { solver_.Solve();