Repository navigation
Raise GPT-OSS Dynamo recompile limit - #3737
Conversation
c144943 to
fbb100c
Compare
| if parallel_dims.tp_enabled or parallel_dims.ep_enabled: | ||
| _raise_dynamo_recompile_limit(model) |
There was a problem hiding this comment.
maybe we can delete this which is for inference only?
torchtitan/torchtitan/experiments/rl/models/vllm_wrapper.py
Lines 196 to 207 in 073221a
There was a problem hiding this comment.
Were they running into this inference issue with gpt-oss ? I wonder if some other model also needs this recompile limit increase...
There was a problem hiding this comment.
Yes, it was for gpt-oss. I think gpt-oss is unique because it's the only model with sliding window attention (non homogenous across all layers)
There was a problem hiding this comment.
Okay, I can remove it. I hope it will be tested sufficiently if I trigger RL ci flow?
There was a problem hiding this comment.
actually it seems not ... maybe we can adapt this one (https://github.com/pytorch/torchtitan/blob/main/torchtitan/experiments/rl/tests/integration_tests.py#L82) from qwen to gpt-oss + varlen (https://github.com/pytorch/torchtitan/blob/main/torchtitan/experiments/rl/examples/alphabet_sort/config_registry.py#L267)
Fixes the gpt-oss FSDP+TP+EP+compile integration test with newer PyTorch. GPT-OSS TP/EP compile can specialize on AsyncCollectiveTensor vs Tensor states, and sliding-window attention adds extra variants. Raise Dynamo's recompile limit locally for this path so fullgraph compile does not fail before all expected variants are cached. The underlying Dynamo caching issue is tracked at pytorch/pytorch#187073.
fbb100c to
325a40e
Compare
Update rl_grpo_moe_debug_tp4_ep4 to use the GPT-OSS debug varlen config while preserving the existing CI selector name.
Controller._start_rollout_producers/_stop_rollout_producers factor the producer pipeline (rollout workers + data input) out of run(), and RolloutGroupWorkBuffer gains pause()/resume(), so panofabric-engine's decentralized_rl windowed loop can drive the consume side itself and keep rollouts from straddling an outer weight merge. Rebased onto upstream a182e53 (torchtitan/experiments/rl -> torchtitan/rl, pytorch#4773). Dropped from this commit versus the 1c7ab80 rebase: - the HF transformers-backend vLLM glue (vllm_wrapper/vllm_registry/ attention): it composed at ModelSpec, which pytorch#4810 deleted, and only served the never-working rl_*_hf* A/B baseline presets. - the global torch._dynamo recompile_limit = 10: a stale copy of code upstream moved into models/gpt_oss in pytorch#3737. - a comment-only hunk in training_sample_builder.py. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Fixes the gpt-oss FSDP+TP+EP+compile integration test with newer PyTorch.
GPT-OSS TP/EP compile can specialize on AsyncCollectiveTensor vs Tensor states, and sliding-window attention adds extra variants. Raise Dynamo's recompile limit locally for this path so fullgraph compile does not fail before all expected variants are cached.
The underlying Dynamo caching issue is tracked at pytorch/pytorch#187073.