[spmd_types] qwen3 sharding - #3653
Conversation
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
| dense_sequence_parallel_placement() | ||
| if enable_ep and enable_sp | ||
| else dense_activation_placement(tp=spmd.R) | ||
| ) |
There was a problem hiding this comment.
I think this is outdated, on main both shared & shared.colwise have this src->dst redistribution
There was a problem hiding this comment.
on main both shared & shared.colwise have this src->dst redistribution
wouldn't DTensor error out in this case? as the in_src is different from actual sharding
There was a problem hiding this comment.
it's ignored if input is already DTensor it seems, we should be stricter. I can put up a separate PR:
torchtitan/torchtitan/protocols/module.py
Lines 594 to 601 in d226342
dst_placements is fine, we already match from outer-level redistribute so no-op there
| import spmd_types as spmd | ||
|
|
||
| from torchtitan.distributed.parallel_dims import MeshAxisName | ||
| from torchtitan.distributed.utils import get_spmd_backend |
| dense_sequence_parallel_placement() | ||
| if enable_ep and enable_sp | ||
| else dense_activation_placement(tp=spmd.R) | ||
| ) |
There was a problem hiding this comment.
on main both shared & shared.colwise have this src->dst redistribution
wouldn't DTensor error out in this case? as the in_src is different from actual sharding
There was a problem hiding this comment.
A quick scanning looks correct to me. But
- since MoE / EP is not supported yet, spmd_types enablement is not there yet?
- Was full dtensor working? Several annotations were wrong?
There was a problem hiding this comment.
is it not? #3447 landed, I was able to fully typecheck
There was a problem hiding this comment.
are you typechecking EP as well? Not sure because I saw #3654
There was a problem hiding this comment.
maybe am confused, this PR has no effect until we enable qwen3 + spmd backend, 2 PRs from now
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
ghstack-source-id: 4ec04ec Pull Request resolved: pytorch/torchtitan#3653
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
SAC + Flex, or SAC + typecheck + non-flex, or typecheck + Flex + full/no AC is fine, but this is not (likely SAC + regional inductor issue). Raise error asking user to use one of the other cominbations Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.12.0) (oldest at bottom): * #3690 * #3673 * #3655 * #3664 * #3654 * #3278 * #3694 * #3472 * #3632 * #3653 * __->__ #3672
ghstack-source-id: 82640f9 Pull Request resolved: pytorch/torchtitan#3653
mostly I/R, adding out_src
Stack from ghstack (oldest at bottom):