torchtitan icon indicating copy to clipboard operation
torchtitan copied to clipboard

[Compiler Toolkit] Assert compile.enable=False

Open SherlockNoMad opened this issue 2 months ago • 3 comments

As title, compile.enable should be False in the compiler toolkit style workflow

SherlockNoMad avatar Oct 28 '25 04:10 SherlockNoMad

curious: currently, loss is compiled separately from model. This parallelize.py only controls model compilation part.

Do we want model's loss to be not compiled at all, or we still want users to control loss compilation?

Maybe it's better to check if "model" is in compile.components here? https://github.com/pytorch/torchtitan/blob/main/torchtitan/models/llama3/train_configs/debug_model.toml#L69

ruisizhang123 avatar Oct 28 '25 04:10 ruisizhang123

Echo to @xmfan's comment. The compile flag must be set to false to enable the compiler toolkit, which seems counterintuitive.

fegin avatar Oct 28 '25 06:10 fegin

ehhh, I think it would be better to keep simplefsdp's parallelize function close to model/deepseek_v3/parallelize.py, which would be easier to integrate new features from main/deepseek_v3.

Why don't we add a context manager to temporary override job_config.compile to False when calling simple_fsdp_parallelize_llama.... I don't think it would be so counterintuitive as long as you leave a comment saying you are doing region compile later.

ruisizhang123 avatar Oct 28 '25 17:10 ruisizhang123