# How to trace torch.autograd.backward or torch.autograd.grad?

**URL:** <https://dev-discuss.pytorch.org/t/how-to-trace-torch-autograd-backward-or-torch-autograd-grad/1684>\
**Category:** FX\
**Created:** [November 27, 2023, 7:08am UTC](https://dev-discuss.pytorch.org/t/how-to-trace-torch-autograd-backward-or-torch-autograd-grad/1684 "2023-11-27T07:08:12Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![shuokay](https://yyz2.discourse-cdn.com/flex036/user_avatar/dev-discuss.pytorch.org/shuokay/32/594_2.png) [@shuokay](https://dev-discuss.pytorch.org/u/shuokay)\
**Post date:** [December 5, 2023, 8:58am UTC](https://dev-discuss.pytorch.org/t/how-to-trace-torch-autograd-backward-or-torch-autograd-grad/1684/3 "2023-12-05T08:58:02Z")

</div>

These discussions might provide some help: [How does torch.compile work with autograd? - #4 by Chillee](https://dev-discuss.pytorch.org/t/how-does-torch-compile-work-with-autograd/1621/4)

---

_[View the full topic](https://dev-discuss.pytorch.org/t/how-to-trace-torch-autograd-backward-or-torch-autograd-grad/1684)._
