未验证 提交 a7539508 编写于 作者: Z zmxdream 提交者: GitHub

[pglbox]hidden unzip (#50292)

* hidden unzip

* fix

* fix
上级 f9c801ff
...@@ -110,7 +110,7 @@ class BRpcServiceImpl : public SimpleRpcService { ...@@ -110,7 +110,7 @@ class BRpcServiceImpl : public SimpleRpcService {
delete head.request; delete head.request;
PADDLE_ENFORCE_NE( PADDLE_ENFORCE_NE(
head.service, head.service,
0, nullptr,
phi::errors::PreconditionNotMet("Service should not be nullptr.")); phi::errors::PreconditionNotMet("Service should not be nullptr."));
head.service->decrease_request(); head.service->decrease_request();
} else { } else {
...@@ -150,8 +150,9 @@ void BaiduRpcServer::initialize() { ...@@ -150,8 +150,9 @@ void BaiduRpcServer::initialize() {
return; return;
} }
PADDLE_ENFORCE_NE( PADDLE_ENFORCE_NE(_gloo,
_gloo, NULL, phi::errors::PreconditionNotMet("Gloo not allow nullptr.")); nullptr,
phi::errors::PreconditionNotMet("Gloo not allow nullptr."));
_gloo->Barrier(); _gloo->Barrier();
_server->set_version(google::VersionString()); _server->set_version(google::VersionString());
brpc::ServerOptions option; brpc::ServerOptions option;
...@@ -237,7 +238,7 @@ static void handle_baidu_rpc_response(brpc::Controller *cntl, ...@@ -237,7 +238,7 @@ static void handle_baidu_rpc_response(brpc::Controller *cntl,
delete head.request; delete head.request;
PADDLE_ENFORCE_NE( PADDLE_ENFORCE_NE(
head.service, head.service,
0, nullptr,
phi::errors::PreconditionNotMet("Service should not be nullptr.")); phi::errors::PreconditionNotMet("Service should not be nullptr."));
head.service->decrease_request(); head.service->decrease_request();
} else { } else {
......
...@@ -31,7 +31,7 @@ class TestUnzipOp(unittest.TestCase): ...@@ -31,7 +31,7 @@ class TestUnzipOp(unittest.TestCase):
place = fluid.CUDAPlace(0) place = fluid.CUDAPlace(0)
x = fluid.data(name='X', shape=[3, 4], dtype='float64') x = fluid.data(name='X', shape=[3, 4], dtype='float64')
lod = fluid.data(name='lod', shape=[11], dtype='int64') lod = fluid.data(name='lod', shape=[11], dtype='int64')
output = paddle.incubate.unzip(x, lod) output = paddle.incubate.operators.unzip(x, lod)
input = [ input = [
[1.0, 2.0, 3.0, 4.0], [1.0, 2.0, 3.0, 4.0],
......
...@@ -23,7 +23,6 @@ from .operators import graph_send_recv ...@@ -23,7 +23,6 @@ from .operators import graph_send_recv
from .operators import graph_khop_sampler from .operators import graph_khop_sampler
from .operators import graph_sample_neighbors from .operators import graph_sample_neighbors
from .operators import graph_reindex from .operators import graph_reindex
from .operators import unzip
from .tensor import segment_sum from .tensor import segment_sum
from .tensor import segment_mean from .tensor import segment_mean
from .tensor import segment_max from .tensor import segment_max
...@@ -56,5 +55,4 @@ __all__ = [ ...@@ -56,5 +55,4 @@ __all__ = [
'segment_max', 'segment_max',
'segment_min', 'segment_min',
'identity_loss', 'identity_loss',
'unzip',
] ]
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册