Skip to content

Commit 926f5f4

Browse files
committed
fix redundant args of lambda and remove exception of destructor
1 parent d117bbc commit 926f5f4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

paddle/fluid/operators/distributed/proto_encoder_helper.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ class ProtoEncodeHelper {
8383

8484
~ProtoEncodeHelper() {
8585
// Make sure callers didn't do operations that went over max_size promised
86-
PADDLE_ENFORCE_LE(p_, limit_);
86+
#define REPLACE_ENFORCE_GLOG 1
87+
paddle::platform::throw_on_error(p_ <= limit_);
88+
#undef REPLACE_ENFORCE_GLOG
8789
}
8890

8991
const char* data() const { return base_; }

paddle/fluid/operators/listen_and_serv_op.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static void ParallelExecuteBlocks(
6060
std::vector<std::future<void>> fs;
6161
for (size_t idx : parallel_blkids) {
6262
fs.push_back(
63-
framework::Async([&executor, &prepared, &program, &scope, idx]() {
63+
framework::Async([&executor, &prepared, &scope, idx]() {
6464
int run_block = idx; // thread local
6565
try {
6666
VLOG(3) << "running server block: " << run_block

0 commit comments

Comments
 (0)