# AOT module decompositions

**URL:** <https://dev-discuss.pytorch.org/t/aot-module-decompositions/2035>\
**Category:** compiler\
**Created:** [April 25, 2024, 6:59pm UTC](https://dev-discuss.pytorch.org/t/aot-module-decompositions/2035 "2024-04-25T18:59:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amogh](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@Amogh](https://dev-discuss.pytorch.org/u/Amogh)\
**Post date:** [April 25, 2024, 6:59pm UTC](https://dev-discuss.pytorch.org/t/aot-module-decompositions/2035/1 "2024-04-25T18:59:02Z")

</div>

I am looking to decompose ops in my model graph traced by AOT module in the following way (using some code from [AOT Autograd - How to use and optimize? — functorch nightly documentation](https://pytorch.org/functorch/nightly/notebooks/aot_autograd_optimizations.html))

```auto
from torch._decomp import core_aten_decompositions
from functorch.compile import aot_module

aot_module(model, fw_compiler=compiler_fn, bw_compiler=compiler_fn, decompositions=**core_aten_decompositions())

```

1. Is this the correct way to do this?
2. My assumption was Core Aten ops won’t be decomposed, and yet when I check the Aten ops as a result of this decomposition, ops like `aten.embedding_dense_backward` and `aten.embedding` get decomposed even though they are listed as Core Aten ops. What am I missing?

---

<div class="post-metadata">

**Author:** ![GodHforever](https://yyz2.discourse-cdn.com/flex036/user_avatar/dev-discuss.pytorch.org/godhforever/32/2516_2.png) [@GodHforever](https://dev-discuss.pytorch.org/u/GodHforever)\
**Post date:** [March 13, 2025, 2:18am UTC](https://dev-discuss.pytorch.org/t/aot-module-decompositions/2035/2 "2025-03-13T02:18:08Z")

</div>

i have the same question……
