# About pytorch process with memory

**URL:** <https://discuss.pytorch.org/t/about-pytorch-process-with-memory/17431>\
**Category:** Uncategorized\
**Created:** [May 3, 2018, 9:54am UTC](https://discuss.pytorch.org/t/about-pytorch-process-with-memory/17431 "2018-05-03T09:54:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xu\_wang](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/x/9dc877/32.png) [@xu\_wang](https://discuss.pytorch.org/u/xu_wang)\
**Post date:** [May 3, 2018, 9:54am UTC](https://discuss.pytorch.org/t/about-pytorch-process-with-memory/17431/1 "2018-05-03T09:54:52Z")

</div>

1.It seems like that if a pytorch process is stopped just by crtl+c,not killed,it will stay in memory all the time.  
2.Using nvidia-smi, I find there are no pytorch program using GPU, the pytorch process still exist.

---

<div class="post-metadata">

**Author:** ![ptrblck](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/32/1823_2.png) [@ptrblck](https://discuss.pytorch.org/u/ptrblck)\
**Post date:** [May 3, 2018, 12:07pm UTC](https://discuss.pytorch.org/t/about-pytorch-process-with-memory/17431/2 "2018-05-03T12:07:57Z")

</div>

Do you use multi-processing e.g. in a `DataLoader`?  
If so, some child processed might still be alive.  
You would have to find them and kill them with their `pid`.  
As far as I know it’s a knows Python issue.

---

<div class="post-metadata">

**Author:** ![xu\_wang](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/x/9dc877/32.png) [@xu\_wang](https://discuss.pytorch.org/u/xu_wang)\
**Post date:** [May 4, 2018, 2:43am UTC](https://discuss.pytorch.org/t/about-pytorch-process-with-memory/17431/3 "2018-05-04T02:43:15Z")

</div>

Thank you very much!  
I will check my code again.
