# About dynamo.disable

**URL:** <https://discuss.pytorch.org/t/about-dynamo-disable/223743>\
**Category:** torch.\_dynamo\
**Created:** [October 29, 2025, 7:55am UTC](https://discuss.pytorch.org/t/about-dynamo-disable/223743 "2025-10-29T07:55:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vaen\_Joe](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/vaen_joe/32/27752_2.png) [@Vaen\_Joe](https://discuss.pytorch.org/u/Vaen_Joe)\
**Post date:** [October 29, 2025, 7:55am UTC](https://discuss.pytorch.org/t/about-dynamo-disable/223743/1 "2025-10-29T07:55:03Z")

</div>

Hi, I have a question about how `torch._dynamo.disable` behaves inside nested model structures.

In my setup, I have a deeply nested model, and I applied `@torch._dynamo.disable` to a small inner function at the deepest level.  
When I run `torch.compile`, Dynamo ends up splitting the whole model into _many_ small subgraphs.

I have two related questions:

1. Why doesn’t Dynamo just split the graph into **two parts** — one from the beginning of the model up to the entry of the disabled function, and another from right after that function to the end of the model — instead of cutting it into many small pieces?

2. Is there any way to make Dynamo perform the segmentation in that “two-subgraph” manner (i.e., a single contiguous FX graph before and after the disabled region)?

Thanks!
