From 7b6bf28184cb53c78957d9e21d414b25b2c9bb41 Mon Sep 17 00:00:00 2001 From: pangyoki Date: Sat, 21 May 2022 04:23:03 +0800 Subject: [PATCH] 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 --- paddle/fluid/memory/detail/memory_block_desc.cc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/paddle/fluid/memory/detail/memory_block_desc.cc b/paddle/fluid/memory/detail/memory_block_desc.cc index 4414fb07a7b..a6580c28f44 100644 --- a/paddle/fluid/memory/detail/memory_block_desc.cc +++ b/paddle/fluid/memory/detail/memory_block_desc.cc @@ -62,18 +62,12 @@ inline size_t hash(const MemoryBlock::Desc& metadata, size_t initial_seed) { } // namespace void MemoryBlock::Desc::UpdateGuards() { -#ifdef PADDLE_WITH_TESTING guard_begin = hash(*this, 1); guard_end = hash(*this, 2); -#endif } bool MemoryBlock::Desc::CheckGuards() const { -#ifdef PADDLE_WITH_TESTING return guard_begin == hash(*this, 1) && guard_end == hash(*this, 2); -#else - return true; -#endif } } // namespace detail -- GitLab