Skip to content

Commit

Permalink
Fix CI errors
Browse files Browse the repository at this point in the history
  • Loading branch information
From00 committed Mar 26, 2022
1 parent 678acca commit 2363830
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions paddle/fluid/memory/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ endif()
cc_library(malloc SRCS malloc.cc DEPS
place enforce allocator_facade profiler ${MKLDNN_CTX_DEPS})
cc_library(memcpy SRCS memcpy.cc DEPS place device_context)
cc_library(stats SRCS stats.cc)

cc_library(stats SRCS stats.cc DEPS enforce)
cc_library(memory DEPS malloc memcpy stats)

cc_test(stats_test SRCS stats_test.cc DEPS stats)
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/memory/stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class Stat : public StatBase {
ThreadLocalStatType* thread_local_stat =
thread_data_registry.GetMutableCurrentThreadData();
thread_local_stat->current += increment;
VLOG(1) << "+" << increment << " sum: " << thread_local_stat->current;

if (thread_local_stat->current > thread_local_stat->peak) {
thread_local_stat->peak = thread_local_stat->current;
int64_t current_value = GetCurrentValue();
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/memory/stats_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ TEST(stats_test, MultiThreadReadWriteTest) {
std::this_thread::sleep_for(std::chrono::seconds(1));
});
}
VLOG(1) << "lunch!";

std::unique_lock<std::mutex> unique_lock(mutex);
cv.wait(unique_lock, [&ready_thread_num, thread_num]() {
return ready_thread_num == thread_num;
Expand Down

1 comment on commit 2363830

@paddle-bot-old
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵️ CI failures summary

🔍 PR: #38657 Commit ID: 2363830 contains failed CI.

🔹 Failed: PR-CI-Static-Check

Unknown Failed
Unknown Failed

Please sign in to comment.