未验证 提交 7b6bf281 编写于 作者: P pangyoki 提交者: GitHub

delete PADDLE_WITH_TESTING in memory_block_desc (#41817)

* delete PADDLE_WITH_TESTING in memory_block_desc

* test FLAGS_allocator_strategy=naive_best_fit

* delete flag naive_best_fit
上级 0d878f1a
...@@ -62,18 +62,12 @@ inline size_t hash(const MemoryBlock::Desc& metadata, size_t initial_seed) { ...@@ -62,18 +62,12 @@ inline size_t hash(const MemoryBlock::Desc& metadata, size_t initial_seed) {
} // namespace } // namespace
void MemoryBlock::Desc::UpdateGuards() { void MemoryBlock::Desc::UpdateGuards() {
#ifdef PADDLE_WITH_TESTING
guard_begin = hash(*this, 1); guard_begin = hash(*this, 1);
guard_end = hash(*this, 2); guard_end = hash(*this, 2);
#endif
} }
bool MemoryBlock::Desc::CheckGuards() const { bool MemoryBlock::Desc::CheckGuards() const {
#ifdef PADDLE_WITH_TESTING
return guard_begin == hash(*this, 1) && guard_end == hash(*this, 2); return guard_begin == hash(*this, 1) && guard_end == hash(*this, 2);
#else
return true;
#endif
} }
} // namespace detail } // namespace detail
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册