File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
vllm/model_executor/layers/fused_moe Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments