Skip to content

Conversation

danielvegamyhre
Copy link
Contributor

We should add an apply_compile function for llama4 that uses fullgraph=False for MoE layers and fullgraph=True for dense layers.

I keep manually applying this hack during development to test compile composability, but IMO we should have this merged and update to use fullgraph=True everywhere once that is supported.

cc @xmfan @tianyu-l any thoughts?

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 2, 2025
Copy link
Contributor

@tianyu-l tianyu-l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi @xmfan had #1365

we should work together to figure out what to do

@danielvegamyhre
Copy link
Contributor Author

@xmfan any thoughts on when #1365 will be landable? if you plan to land it soon we can close this. this is a temporary solution to avoid having to add this change to every feature branch in torchtitan i make while doing MoE related work across torchao and torchtitan

@xmfan
Copy link
Member

xmfan commented Aug 4, 2025

@tianyu-l i think fullgraph=False is better than compile just not working on main, so good with landing this

Copy link
Contributor

@tianyu-l tianyu-l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should do this to dsv3 too

@danielvegamyhre danielvegamyhre merged commit 2844029 into pytorch:main Aug 4, 2025
5 checks passed
bentherien pushed a commit to bentherien/torchtitan_ that referenced this pull request Aug 5, 2025
…ers (pytorch#1519)

We should add an `apply_compile` function for llama4 that uses
fullgraph=False for MoE layers and fullgraph=True for dense layers.

I keep manually applying this hack during development to test compile
composability, but IMO we should have this merged and update to use
fullgraph=True everywhere once that is supported.

cc @xmfan @tianyu-l any thoughts?
joellidin pushed a commit to tplr-ai/torchtitan that referenced this pull request Aug 8, 2025
…ers (pytorch#1519)

We should add an `apply_compile` function for llama4 that uses
fullgraph=False for MoE layers and fullgraph=True for dense layers.

I keep manually applying this hack during development to test compile
composability, but IMO we should have this merged and update to use
fullgraph=True everywhere once that is supported.

cc @xmfan @tianyu-l any thoughts?
joellidin pushed a commit to tplr-ai/torchtitan that referenced this pull request Aug 8, 2025
…ers (pytorch#1519)

We should add an `apply_compile` function for llama4 that uses
fullgraph=False for MoE layers and fullgraph=True for dense layers.

I keep manually applying this hack during development to test compile
composability, but IMO we should have this merged and update to use
fullgraph=True everywhere once that is supported.

cc @xmfan @tianyu-l any thoughts?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants