Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions python/sglang/srt/eplb/expert_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ def init_trivial(

if common is None:
return None

num_physical_experts = common["num_physical_experts"]
model_config_for_expert_location = common["model_config_for_expert_location"]
num_layers = model_config_for_expert_location.num_layers
Expand All @@ -103,7 +102,6 @@ def init_trivial(
torch.arange(0, num_physical_experts).repeat(num_layers, 1)
% num_logical_experts
)

return ExpertLocationMetadata.init_by_mapping(
server_args,
model_config,
Expand Down Expand Up @@ -135,7 +133,6 @@ def init_by_mapping(
ep_size=common["ep_size"],
moe_ep_rank=moe_ep_rank,
)

return ExpertLocationMetadata._init_raw(
server_args=server_args,
ep_size=common["ep_size"],
Expand Down Expand Up @@ -229,7 +226,6 @@ def _init_raw(
logical_to_all_physical_map_num_valid = torch.count_nonzero(
logical_to_all_physical_map != -1, dim=-1
)

return ExpertLocationMetadata(
physical_to_logical_map=physical_to_logical_map,
physical_to_logical_map_cpu=physical_to_logical_map.cpu(),
Expand Down Expand Up @@ -333,7 +329,6 @@ def _compute_logical_to_all_physical_map(
logical_to_all_physical_map[layer_id][logical_expert_id].append(
physical_expert_id
)

# Replace by the physical expert on local GPU or node if possible
if moe_ep_rank is not None:
num_gpus_per_node = server_args.ep_size // server_args.nnodes
Expand Down
Loading