Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
jroesch committed May 29, 2019
1 parent b3fe5da commit b67c442
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions src/relay/pass/type_infer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -609,50 +609,6 @@ class TypeInferencer : private ExprFunctor<Type(const Expr&)>,
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<TensorType> concrete_types;
// std::vector<Type> to_unify;
// for (auto ty : hints) {
// auto rty = solver_.Resolve(ty);
// if (rty.as<IncompleteTypeNode>() != nullptr) {
// to_unify.push_back(rty);
// } else {
// concrete_types.push_back(Downcast<TensorType>(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<IncompleteTypeNode>() == nullptr) {
// it->second.checked_type = general_shape;
// } else {
// it->second.checked_type = Unify(rtype, general_shape, expr);
// }
// }
// }
void Solve() {
solver_.Solve();

Expand Down

0 comments on commit b67c442

Please sign in to comment.