提交 16131359 编写于 作者: M Megvii Engine Team

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

GitOrigin-RevId: 2b849d7fe288ed22a5e5ccbadff312e104b4d2f6
上级 846cc13c
...@@ -616,7 +616,8 @@ void ChannelImpl::produce_tensor(TensorInfo* dest, TensorPtr ptr) { ...@@ -616,7 +616,8 @@ void ChannelImpl::produce_tensor(TensorInfo* dest, TensorPtr ptr) {
dest->ptr = std::move(ptr); dest->ptr = std::move(ptr);
dest->evict_type = EvictType::NONE; dest->evict_type = EvictType::NONE;
dest->status = TensorInfo::Produced; 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); m_dtr.insert_candidate(dest);
} }
notify_tensor_unsafe(dest); notify_tensor_unsafe(dest);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册