diff --git a/src/relay/pass/alter_op_layout.cc b/src/relay/pass/alter_op_layout.cc index 30bc5c05a1d2..c3a34ca35bf7 100644 --- a/src/relay/pass/alter_op_layout.cc +++ b/src/relay/pass/alter_op_layout.cc @@ -44,7 +44,7 @@ class TransformMemorizerNode : public Node { public: // map from (Expr, src_layout, dst_layout) to transformed Expr using TransformKey = std::tuple; - struct key_hash : public std::unary_function { +struct key_hash : public std::function { std::size_t operator()(const TransformKey& k) const { return dmlc::HashCombine(dmlc::HashCombine( std::hash()(std::get<0>(k)), std::get<1>(k)), (std::get<2>(k)));