Replies: 1 comment
-
|
The TP overlap implementation was originally designed assuming a static From the code you shared: input_shape = [
(args.seq_length * args.micro_batch_size) //
args.context_parallel_size,
args.hidden_size,
]
te_module.base.initialize_ub(
shape=input_shape,
tp_size=args.tensor_model_parallel_size,
...
)the user buffers (UBs) are allocated once during initialization using the maximum configured sequence length ( Therefore, if your THD batches contain varying sequence lengths, the TP overlap implementation does not dynamically adjust the communication buffers. Instead, one of the following must happen:
So, unless there have been recent changes in Transformer Engine's UB implementation, TP overlap should be considered optimized for fixed-size communication buffers, not arbitrary THD layouts. Why doesn't the hidden dimension appear in
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, thank you for great works.
I have a question about tp-overlap.
The function below make a buffer for
args.seq_length * args.micro_batch_size. Do this support thd format?Follow this question, I have found that after TP/SP mlp layer, the output shape is exactly
seqlen, args.hidden_size. So how does that works for qkv_projhidden_dim * 3/ tp_sizeand mlphidden_dim * 2 / tp_size?Beta Was this translation helpful? Give feedback.
All reactions