From 937797849e22b5e0ce642ebc9d673eac0b40e9f5 Mon Sep 17 00:00:00 2001 From: Yi Wang Date: Tue, 3 Apr 2018 10:36:49 -0700 Subject: [PATCH] Fix serde_test.cc compile error --- paddle/fluid/operators/detail/serde_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/operators/detail/serde_test.cc b/paddle/fluid/operators/detail/serde_test.cc index 6fb2369e6..f8cae6b26 100644 --- a/paddle/fluid/operators/detail/serde_test.cc +++ b/paddle/fluid/operators/detail/serde_test.cc @@ -102,12 +102,12 @@ void RunSerdeTestSelectedRows(platform::Place place) { } else { tensor_data2 = const_cast(tensor2->data()); } - const size_t* rows_data2 = rows2->data(); + const int64_t* rows_data2 = rows2->data(); for (int i = 0; i < tensor_numel; ++i) { EXPECT_FLOAT_EQ(tensor_data2[i], 32.7); } - for (size_t i = 0; i < rows2->size(); ++i) { + for (int64_t i = 0; i < rows2->size(); ++i) { EXPECT_EQ(rows_data2[i], i); } EXPECT_EQ(slr2->height(), 1000); -- GitLab