[feature] Reduce memory usage with SP (#7728)

Signed-off-by: Maciej Bala <mbala@nvidia.com>
This commit is contained in:
MaciejBalaNV authored and GitHub committed 2026-10-07 22:36:32 +08:00
1 parent 3dc35694b3
commit e54e185593
7 files changed
+475 -17

No files matched your search

+4
View File
@@ -281,6 +281,10 @@ NOTE: be careful to test adequately when refactoring classes that take this styl
| `expected_dims` | int \| None | Expected tensor rank for validation (optional) |
| `split_output` | bool | `False`: shard **input** params; `True`: shard **output** tensors |
| `auto_pad` | bool | Auto-pad if sequence not divisible by world_size (default: `False`) |
| `clone_shard` | bool | Give multi-rank shards their own contiguous storage (default: `False`); single-rank inputs are unchanged |
With `clone_shard=True`, memory savings require callers to drop their references to the full tensor.
Other references to the same storage also keep the full allocation alive.
**SequenceParallelOutput Parameters:**