Browse Source

fix(imperative): insert to candidate only if pinned is 0

GitOrigin-RevId: 2b849d7fe2
release-1.7
Megvii Engine Team 3 years ago
parent
commit
1613135990
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      imperative/src/impl/interpreter/interpreter_impl.cpp

+ 2
- 1
imperative/src/impl/interpreter/interpreter_impl.cpp View File

@@ -616,7 +616,8 @@ void ChannelImpl::produce_tensor(TensorInfo* dest, TensorPtr ptr) {
dest->ptr = std::move(ptr);
dest->evict_type = EvictType::NONE;
dest->status = TensorInfo::Produced;
if (dest->size_exceeds_thd(state.options.dtr_evictee_minimum_size)) {
if (dest->pinned == 0 &&
dest->size_exceeds_thd(state.options.dtr_evictee_minimum_size)) {
m_dtr.insert_candidate(dest);
}
notify_tensor_unsafe(dest);


Loading…
Cancel
Save