# PrimTorch: decompose ATen ops

**URL:** <https://dev-discuss.pytorch.org/t/primtorch-decompose-aten-ops/1086>\
**Category:** compiler\
**Created:** [February 28, 2023, 9:57am UTC](https://dev-discuss.pytorch.org/t/primtorch-decompose-aten-ops/1086 "2023-02-28T09:57:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joshlk](https://yyz2.discourse-cdn.com/flex036/user_avatar/dev-discuss.pytorch.org/joshlk/32/727_2.png) [@joshlk](https://dev-discuss.pytorch.org/u/joshlk)\
**Post date:** [February 28, 2023, 9:57am UTC](https://dev-discuss.pytorch.org/t/primtorch-decompose-aten-ops/1086/1 "2023-02-28T09:57:43Z")

</div>

From my understanding PrimTorch decomposes front end ops to a smaller number of primitive ops. Is there a way to use PrimTorch to decompose backend ops (ATen ops) to primitive ops? And if not is this within scope of the project?

---

<div class="post-metadata">

**Author:** ![joshlk](https://yyz2.discourse-cdn.com/flex036/user_avatar/dev-discuss.pytorch.org/joshlk/32/727_2.png) [@joshlk](https://dev-discuss.pytorch.org/u/joshlk)\
**Post date:** [March 23, 2023, 12:00pm UTC](https://dev-discuss.pytorch.org/t/primtorch-decompose-aten-ops/1086/2 "2023-03-23T12:00:47Z")

</div>

Here is an example of decomposing ops in eager mode: [Example of running Decomposition in eager mode by SherlockNoMad · Pull Request #96466 · pytorch/pytorch · GitHub](https://github.com/pytorch/pytorch/pull/96466)
