Skip to content

Commit 3743caa

Browse files
authored
Merge pull request #9617 from wangkuiyi/fix_listen_and_serv_op.cc
Fix compare warning in listen_and_serv_op.cc
2 parents 3ceff30 + ebcf5fb commit 3743caa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

paddle/fluid/operators/listen_and_serv_op.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class ListenAndServOp : public framework::OperatorBase {
9696

9797
auto *block = Attr<framework::BlockDesc *>(kOptimizeBlock);
9898
auto *program = block->Program();
99-
int num_blocks = program->Size();
99+
size_t num_blocks = program->Size();
100100
PADDLE_ENFORCE_GE(num_blocks, 2,
101101
"server program should have at least 2 blocks");
102102

@@ -153,7 +153,7 @@ class ListenAndServOp : public framework::OperatorBase {
153153

154154
// The optimize blocks which have the same parent ID would run parallel
155155
// TODO(Yancey1989): need to use ParallelExecutor for future
156-
size_t last_parent_blkid = program->Block(1).Parent();
156+
int32_t last_parent_blkid = program->Block(1).Parent();
157157
std::vector<size_t> parallel_blkids;
158158
parallel_blkids.push_back(1);
159159
double ts = detail::GetTimestamp();

0 commit comments

Comments
 (0)