# Freezing at "Using /home/user/.cache/torch\_extensions as PyTorch extensions root..."

**URL:** <https://discuss.pytorch.org/t/freezing-at-using-home-user-cache-torch-extensions-as-pytorch-extensions-root/132759>\
**Category:** Uncategorized\
**Created:** [September 25, 2021, 3:14am UTC](https://discuss.pytorch.org/t/freezing-at-using-home-user-cache-torch-extensions-as-pytorch-extensions-root/132759 "2021-09-25T03:14:10Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jiqing\_Zhang](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/jiqing_zhang/32/9598_2.png) [@Jiqing\_Zhang](https://discuss.pytorch.org/u/Jiqing_Zhang)\
**Post date:** [September 25, 2021, 3:14am UTC](https://discuss.pytorch.org/t/freezing-at-using-home-user-cache-torch-extensions-as-pytorch-extensions-root/132759/1 "2021-09-25T03:14:10Z")

</div>

HELP！  
the program seems to just stop with once “Using /home/user/.cache/torch\_extensions as PyTorch extensions root…” prints

---

<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:** [September 25, 2021, 3:23am UTC](https://discuss.pytorch.org/t/freezing-at-using-home-user-cache-torch-extensions-as-pytorch-extensions-root/132759/2 "2021-09-25T03:23:06Z")

</div>

Could you describe the use case and issue a bit more? When are you running into this hang and would it be possible to post a minimal code snippet to reproduce the issue?  
Also, could you update PyTorch to the latest release, if you are using an older one?

---

<div class="post-metadata">

**Author:** ![Jiqing\_Zhang](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/jiqing_zhang/32/9598_2.png) [@Jiqing\_Zhang](https://discuss.pytorch.org/u/Jiqing_Zhang)\
**Post date:** [September 25, 2021, 3:28am UTC](https://discuss.pytorch.org/t/freezing-at-using-home-user-cache-torch-extensions-as-pytorch-extensions-root/132759/3 "2021-09-25T03:28:22Z")

</div>

Hi，as shown in the figure, there is no error message.

 ![image](https://discuss.pytorch.org/uploads/default/original/3X/a/b/abffba31ce32a1e570b70a3e83a4d3ef11b155f9.jpeg)

I use 3090, and the CUDA version is 11.1. I tried to update my pytorch from 1.7 to 1.9, it still hasn’t been resolved.

---

<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:** [September 25, 2021, 3:39am UTC](https://discuss.pytorch.org/t/freezing-at-using-home-user-cache-torch-extensions-as-pytorch-extensions-root/132759/4 "2021-09-25T03:39:28Z")

</div>

Thanks for the update. I don’t think you are seeing a hang, but just a runtime compilation of an extension.

---

<div class="post-metadata">

**Author:** ![Jiqing\_Zhang](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/jiqing_zhang/32/9598_2.png) [@Jiqing\_Zhang](https://discuss.pytorch.org/u/Jiqing_Zhang)\
**Post date:** [September 25, 2021, 7:52am UTC](https://discuss.pytorch.org/t/freezing-at-using-home-user-cache-torch-extensions-as-pytorch-extensions-root/132759/5 "2021-09-25T07:52:49Z")

</div>

Hi， I waited for it 3.5 hours. However, it still stops here. 🤣

---

<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:** [September 25, 2021, 8:01am UTC](https://discuss.pytorch.org/t/freezing-at-using-home-user-cache-torch-extensions-as-pytorch-extensions-root/132759/6 "2021-09-25T08:01:11Z")

</div>

OK, that doesn’t sound right. 😛 Try to narrow down which extension is being built and then maybe run it in isolation (or pre-built it to check, if this would be working).

---

<div class="post-metadata">

**Author:** ![googlebot](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/g/ba8739/32.png) [@googlebot](https://discuss.pytorch.org/u/googlebot)\
**Post date:** [September 26, 2021, 11:40pm UTC](https://discuss.pytorch.org/t/freezing-at-using-home-user-cache-torch-extensions-as-pytorch-extensions-root/132759/7 "2021-09-26T23:40:53Z")

</div>

there may be a leftover .lock file from aborted build, try cleaning either whole .cache or extension’s sub-directory, I don’t remember where this file appears, but I had a hang because of it

---

<div class="post-metadata">

**Author:** ![Jiqing\_Zhang](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/jiqing_zhang/32/9598_2.png) [@Jiqing\_Zhang](https://discuss.pytorch.org/u/Jiqing_Zhang)\
**Post date:** [September 27, 2021, 2:39am UTC](https://discuss.pytorch.org/t/freezing-at-using-home-user-cache-torch-extensions-as-pytorch-extensions-root/132759/8 "2021-09-27T02:39:43Z")

</div>

I deleted the whole .cache, and it works now. 🙊

---

<div class="post-metadata">

**Author:** ![Rifle\_Zhang](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/rifle_zhang/32/28037_2.png) [@Rifle\_Zhang](https://discuss.pytorch.org/u/Rifle_Zhang)\
**Post date:** [January 27, 2023, 9:26pm UTC](https://discuss.pytorch.org/t/freezing-at-using-home-user-cache-torch-extensions-as-pytorch-extensions-root/132759/9 "2023-01-27T21:26:49Z")

</div>

deleting the /.cache/pytorch\_extensions works for me.

---

<div class="post-metadata">

**Author:** ![mustious](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/mustious/32/67444_2.png) [@mustious](https://discuss.pytorch.org/u/mustious)\
**Post date:** [October 30, 2024, 9:35am UTC](https://discuss.pytorch.org/t/freezing-at-using-home-user-cache-torch-extensions-as-pytorch-extensions-root/132759/10 "2024-10-30T09:35:54Z")

</div>

Delete the torch\_extension cache  
`rm -rf ~/.cache/torch_extensions/`

Source: [Training stuck after loading the model? · Issue #2816 · microsoft/DeepSpeed · GitHub](https://github.com/microsoft/DeepSpeed/issues/2816)
