Skip to content

Commit e2a3038

Browse files
committed
Format.
1 parent 33a5de5 commit e2a3038

File tree

1 file changed

+2
-6
lines changed
  • vllm/model_executor/layers/fused_moe

1 file changed

+2
-6
lines changed

vllm/model_executor/layers/fused_moe/layer.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -788,19 +788,15 @@ def ensure_round_robin_expert_routing_tables(
788788
global_num_experts, dtype=torch.long, **device_kwargs
789789
)
790790
owner = torch.remainder(global_indices, ep_size)
791-
local_index = torch.div(
792-
global_indices, ep_size, rounding_mode="floor"
793-
)
791+
local_index = torch.div(global_indices, ep_size, rounding_mode="floor")
794792
base = global_num_experts // ep_size
795793
remainder = global_num_experts % ep_size
796794
physical_offset = owner * base
797795
if remainder > 0:
798796
remainder_tensor = torch.tensor(
799797
remainder, dtype=torch.long, **device_kwargs
800798
)
801-
physical_offset = physical_offset + torch.minimum(
802-
owner, remainder_tensor
803-
)
799+
physical_offset = physical_offset + torch.minimum(owner, remainder_tensor)
804800

805801
global_to_physical = physical_offset + local_index
806802
physical_to_global = torch.empty_like(global_to_physical)

0 commit comments

Comments
 (0)