From 2e23fd43f19577884e1508d2315d6d626d74b06d Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Mon, 11 Jul 2022 23:47:41 -0400 Subject: [PATCH] fix grappler compilation error with TF 1.15 See https://github.com/deepmodeling/deepmd-kit/issues/1746#issuecomment-1181271069 Signed-off-by: Jinzhe Zeng --- source/op/optimizer/parallel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/op/optimizer/parallel.h b/source/op/optimizer/parallel.h index efedf65da8..4fa4f69648 100644 --- a/source/op/optimizer/parallel.h +++ b/source/op/optimizer/parallel.h @@ -16,11 +16,11 @@ class DPParallel : public CustomGraphOptimizer { bool UsesFunctionLibrary() const override { return false; } Status Optimize(Cluster* cluster, const GrapplerItem& item, GraphDef* optimized_graph) override; -#if TF_MAJOR_VERSION >= 2 && TF_MINOR_VERSION < 6 +#if (TF_MAJOR_VERSION >= 2 && TF_MINOR_VERSION < 6) || TF_MAJOR_VERSION < 2 // TF 3457a2b122e50b4d44ceaaed5a663d635e5c22df void Feedback(Cluster* cluster, const GrapplerItem& item, const GraphDef& optimized_graph, double result) override {} #endif }; -#endif // DP_REMAPPER_H_ \ No newline at end of file +#endif // DP_REMAPPER_H_