diff --git a/paddle/fluid/distributed/ps/service/simple_rpc/baidu_rpc_server.cc b/paddle/fluid/distributed/ps/service/simple_rpc/baidu_rpc_server.cc index 99cadfc185ac261b5ae909f594cbca4d7f39fb2e..f3e501dd00ce1b127955d984a997c3334a51466d 100644 --- a/paddle/fluid/distributed/ps/service/simple_rpc/baidu_rpc_server.cc +++ b/paddle/fluid/distributed/ps/service/simple_rpc/baidu_rpc_server.cc @@ -110,7 +110,7 @@ class BRpcServiceImpl : public SimpleRpcService { delete head.request; PADDLE_ENFORCE_NE( head.service, - 0, + nullptr, phi::errors::PreconditionNotMet("Service should not be nullptr.")); head.service->decrease_request(); } else { @@ -150,8 +150,9 @@ void BaiduRpcServer::initialize() { return; } - PADDLE_ENFORCE_NE( - _gloo, NULL, phi::errors::PreconditionNotMet("Gloo not allow nullptr.")); + PADDLE_ENFORCE_NE(_gloo, + nullptr, + phi::errors::PreconditionNotMet("Gloo not allow nullptr.")); _gloo->Barrier(); _server->set_version(google::VersionString()); brpc::ServerOptions option; @@ -237,7 +238,7 @@ static void handle_baidu_rpc_response(brpc::Controller *cntl, delete head.request; PADDLE_ENFORCE_NE( head.service, - 0, + nullptr, phi::errors::PreconditionNotMet("Service should not be nullptr.")); head.service->decrease_request(); } else { diff --git a/python/paddle/fluid/tests/unittests/test_unzip_op.py b/python/paddle/fluid/tests/unittests/test_unzip_op.py index 65a353822b12fbd185dce4e9e5bdbefcd2370e5a..71caac8c0f2f80ddce73c24e6e2d77e9ecb7395c 100644 --- a/python/paddle/fluid/tests/unittests/test_unzip_op.py +++ b/python/paddle/fluid/tests/unittests/test_unzip_op.py @@ -31,7 +31,7 @@ class TestUnzipOp(unittest.TestCase): place = fluid.CUDAPlace(0) x = fluid.data(name='X', shape=[3, 4], dtype='float64') lod = fluid.data(name='lod', shape=[11], dtype='int64') - output = paddle.incubate.unzip(x, lod) + output = paddle.incubate.operators.unzip(x, lod) input = [ [1.0, 2.0, 3.0, 4.0], diff --git a/python/paddle/incubate/__init__.py b/python/paddle/incubate/__init__.py index 69d4ca2b0c8ae5c7edb607c954a887bf256074e4..97dd8353be50c800e03e9ee947368241b49cf44e 100644 --- a/python/paddle/incubate/__init__.py +++ b/python/paddle/incubate/__init__.py @@ -23,7 +23,6 @@ from .operators import graph_send_recv from .operators import graph_khop_sampler from .operators import graph_sample_neighbors from .operators import graph_reindex -from .operators import unzip from .tensor import segment_sum from .tensor import segment_mean from .tensor import segment_max @@ -56,5 +55,4 @@ __all__ = [ 'segment_max', 'segment_min', 'identity_loss', - 'unzip', ]