From 953eaadbf6b799272ae316fe3b87febf3c2dc185 Mon Sep 17 00:00:00 2001 From: qijun Date: Wed, 26 Jul 2017 00:07:20 +0800 Subject: [PATCH] fix bug in OpKernelKey equal method --- paddle/framework/operator.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/paddle/framework/operator.h b/paddle/framework/operator.h index f59314f828..0997983a03 100644 --- a/paddle/framework/operator.h +++ b/paddle/framework/operator.h @@ -199,7 +199,9 @@ class OperatorWithKernel : public OperatorBase { place_ = dev_ctx.GetPlace(); } - bool operator==(const OpKernelKey& o) const { return place_ == o.place_; } + bool operator==(const OpKernelKey& o) const { + return platform::places_are_same_class(place_, o.place_); + } }; struct OpKernelHash { -- GitLab