From e606b44ab25cf225910a3f1bae3e85ed387459c3 Mon Sep 17 00:00:00 2001 From: Tomasz Socha Date: Wed, 9 Feb 2022 02:33:25 +0100 Subject: [PATCH] Fix operator== for float16 (#39400) --- paddle/fluid/framework/custom_kernel_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/framework/custom_kernel_test.cc b/paddle/fluid/framework/custom_kernel_test.cc index 5f01681624e..ea84de700d5 100644 --- a/paddle/fluid/framework/custom_kernel_test.cc +++ b/paddle/fluid/framework/custom_kernel_test.cc @@ -73,7 +73,7 @@ void FakeDot(const paddle::CPUContext& dev_ctx, const paddle::Tensor& x, assert(fake_attr_float == 2); assert(fake_attr_double == 3); assert(fake_attr_int64 == 4); - assert(fake_attr_f16 == 5); + assert(fake_attr_f16 == pten::dtype::float16(5)); assert(fake_attr_dtype == pten::DataType::UINT32); assert(fake_attr_int64_vec.size() == 0); assert(fake_attr_int_vec.size() == 0); -- GitLab