From 07f6c875fc1b6e524598f05c7a120903edc86f4d Mon Sep 17 00:00:00 2001 From: ziyoujiyi <997620387@qq.com> Date: Wed, 27 Apr 2022 04:12:17 +0000 Subject: [PATCH] fix heter unitest --- paddle/fluid/operators/pscore/heter_cloud_comm_cpu_test.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) mode change 100644 => 100755 paddle/fluid/operators/pscore/heter_cloud_comm_cpu_test.cc diff --git a/paddle/fluid/operators/pscore/heter_cloud_comm_cpu_test.cc b/paddle/fluid/operators/pscore/heter_cloud_comm_cpu_test.cc old mode 100644 new mode 100755 index cf6369eecdf9cb..d38ac584e8e7b3 --- a/paddle/fluid/operators/pscore/heter_cloud_comm_cpu_test.cc +++ b/paddle/fluid/operators/pscore/heter_cloud_comm_cpu_test.cc @@ -122,6 +122,7 @@ void TestShardSendRecv( void PressTestSendRecv( std::shared_ptr heter_client_ptr_) { // long l = 0, m = 0; + // https://paddlerec.bj.bcebos.com/online_infer/arm_brpc_ubuntu18/send_20_34 std::ifstream file("/send_20_34", std::ios::in | std::ios::binary); // l = file.tellg(); // file.seekg(0, std::ios::end); @@ -129,7 +130,7 @@ void PressTestSendRecv( // file.close(); // VLOG(0) << "size of file " << "20_34" << " is " << (m - l) << " bytes.\n"; int64_t vars_len = 2359296 * sizeof(float); - int64_t data_size = vars_len * sizeof(float); + int64_t data_size = vars_len; VLOG(0) << "float num: " << data_size; float* data_ptr = new float[data_size]; file.read((char*)data_ptr, 9437184); @@ -254,8 +255,8 @@ TEST(HETERSENDANDRECV, CPU) { exe.Prepare(program, 0); // solve undefined symbol: tensor_table.cc // TestScopeSendRecv(heter_client_ptr_); - TestShardSendRecv(heter_client_ptr_); - // PressTestSendRecv(heter_client_ptr_); + //TestShardSendRecv(heter_client_ptr_); + PressTestSendRecv(heter_client_ptr_); switch_server_ptr_a->Stop(); LOG(INFO) << "switch server A stopped";