diff --git a/paddle/fluid/memory/detail/memory_block_desc.cc b/paddle/fluid/memory/detail/memory_block_desc.cc index 4414fb07a7bf3de338f54480b25aa4058109d74a..a6580c28f447a3b25f2d52c37e08a583833a1cc5 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