[RFC][EPLB][#32028] Remove dead torch.accelerator.synchronize() from sync path (#40733)

Signed-off-by: SandishKumarHN <3078999+SandishKumarHN@users.noreply.github.com>
Co-authored-by: SandishKumarHN <3078999+SandishKumarHN@users.noreply.github.com>
This commit is contained in:
SandishKumarHN
2026-05-22 15:19:24 -04:00
committed by GitHub
co-authored by SandishKumarHN
parent 2b94d1c0ca
commit 977703aa94
@@ -584,10 +584,6 @@ def rearrange_expert_weights_inplace(
# have the same shape.
weights_buffer = [torch.empty_like(w) for w in first_layer_weights]
# NOTE(bowen): We need this synchronize to run, but I don't know why.
# If you figure out the reason, please let me know -- thank you!
torch.accelerator.synchronize()
old_global_expert_indices_cpu = old_global_expert_indices.cpu().numpy()
new_global_expert_indices_cpu = new_global_expert_indices.cpu().numpy()