# Why is torch.mm non deterministic?

**URL:** <https://discuss.pytorch.org/t/why-is-torch-mm-non-deterministic/157735>\
**Category:** Uncategorized\
**Created:** [July 28, 2022, 2:09pm UTC](https://discuss.pytorch.org/t/why-is-torch-mm-non-deterministic/157735 "2022-07-28T14:09:42Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Megh\_Bhalerao](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/megh_bhalerao/32/13547_2.png) [@Megh\_Bhalerao](https://discuss.pytorch.org/u/Megh_Bhalerao)\
**Post date:** [August 29, 2022, 4:40am UTC](https://discuss.pytorch.org/t/why-is-torch-mm-non-deterministic/157735/5 "2022-08-29T04:40:17Z")

</div>

Hi, sorry to open this issue again, but I am still not completely clear as to why torch.mm is non deterministic. I understand that there are some backend cuda operations that are non deterministic, but a matrix multiply must be deterministic right? Other wise if I do AB where A and B are matrices, and I do the same operation again, I will get 2 different results which does not make sense?  
Am I missing some crucial point here? Please let me know and thanks again for your time.

---

_[View the full topic](https://discuss.pytorch.org/t/why-is-torch-mm-non-deterministic/157735)._
