From d29cc7b4c3481775417074ffeee02ec65bd9a3c4 Mon Sep 17 00:00:00 2001 From: zyfncg Date: Fri, 19 Nov 2021 18:09:57 +0800 Subject: [PATCH] Fix CI bug caused by type of TensorMeta (#37373) * rename TensorBase interface data_type() to dtype() * rename type to dtype of TensorMeta * merge the code * merge the code * fix the problem when merge conflict * fix bug of ci caused by type of tensor_meta * changes cmake to clear cache --- cmake/external/brpc.cmake | 1 + paddle/pten/tests/kernels/test_elementwise_dev_api.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/external/brpc.cmake b/cmake/external/brpc.cmake index 1a45cfa0a1e..c782da81652 100644 --- a/cmake/external/brpc.cmake +++ b/cmake/external/brpc.cmake @@ -64,6 +64,7 @@ ExternalProject_Add( -DCMAKE_BUILD_TYPE:STRING=${THIRD_PARTY_BUILD_TYPE} BUILD_BYPRODUCTS ${BRPC_LIBRARIES} ) + # ADD_DEPENDENCIES(extern_brpc protobuf ssl crypto leveldb gflags glog gtest snappy) ADD_DEPENDENCIES(extern_brpc protobuf ssl crypto leveldb gflags glog snappy) ADD_LIBRARY(brpc STATIC IMPORTED GLOBAL) diff --git a/paddle/pten/tests/kernels/test_elementwise_dev_api.cc b/paddle/pten/tests/kernels/test_elementwise_dev_api.cc index c6e0d339915..8dafce1fba7 100644 --- a/paddle/pten/tests/kernels/test_elementwise_dev_api.cc +++ b/paddle/pten/tests/kernels/test_elementwise_dev_api.cc @@ -118,7 +118,7 @@ TEST(DEV_API, subtract) { // 3. check result ASSERT_EQ(dense_out.dims().size(), 2); ASSERT_EQ(dense_out.dims()[0], 3); - ASSERT_EQ(dense_out.meta().type, pten::DataType::FLOAT32); + ASSERT_EQ(dense_out.dtype(), pten::DataType::FLOAT32); ASSERT_EQ(dense_out.meta().layout, pten::DataLayout::NCHW); auto expect_result = sub; -- GitLab