-
Notifications
You must be signed in to change notification settings - Fork 601
[Compiler Toolkit] Assert compile.enable=False #1947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
xmfan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems weird, if anything shouldn't we assert it to always be True?
|
curious: currently, loss is compiled separately from model. This 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 |
| job_config: JobConfig, | ||
| ) -> CompiledModule: | ||
| assert ( | ||
| not job_config.compile.enable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| not job_config.compile.enable | |
| "model" not in job_config.compile.components |
|
Echo to @xmfan's comment. The compile flag must be set to false to enable the compiler toolkit, which seems counterintuitive. |
yiming0416
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Asserting compile.enable=False indeed seems counterintuitive under the compiler_toolkit experiment. WDYT about the following:
Refactor parallelize_deepseekv3() in experiments/simple_fsdp/deepseek_v3/parallelize.py into a parallelize_base_fn which contains everything until the line of if job_config.compile.enable
Then we import this parallelize_base_fn in the compiler_toolkit experiments folder. Then compile.enable=True, we apply the CompiledModule wrapper. In this way, we always assert compile.enable=True
|
ehhh, I think it would be better to keep simplefsdp's parallelize function close to Why don't we add a context manager to temporary override |
As title, compile.enable should be False in the compiler toolkit style workflow