[ROCm] Widen AITER fused AR RMSNorm 1-stage gate (#42409)
Signed-off-by: Aakif Nawaz <aakif.nawaz@amd.com>
This commit is contained in:
+5
-1
@@ -744,7 +744,11 @@ def _rocm_aiter_fused_allreduce_rmsnorm_impl(
|
|||||||
total_bytes = input_.numel() * input_.element_size()
|
total_bytes = input_.numel() * input_.element_size()
|
||||||
hidden_dim = input_.shape[-1]
|
hidden_dim = input_.shape[-1]
|
||||||
token_num = input_.shape[0]
|
token_num = input_.shape[0]
|
||||||
hidden_ok = hidden_dim in (512, 1024, 2048, 4096, 7168)
|
if input_.dtype in (torch.bfloat16, torch.float16):
|
||||||
|
pack_size = 16 // input_.element_size()
|
||||||
|
hidden_ok = hidden_dim % pack_size == 0 and hidden_dim // pack_size <= 1024
|
||||||
|
else:
|
||||||
|
hidden_ok = False
|
||||||
token_ok = token_num <= 80
|
token_ok = token_num <= 80
|
||||||
world_size = aiter_ar.world_size
|
world_size = aiter_ar.world_size
|
||||||
full_nvlink = aiter_ar.fully_connected
|
full_nvlink = aiter_ar.fully_connected
|
||||||
|
|||||||
Reference in New Issue
Block a user