Fix per file ruff ignores related to simplification (#26259)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2025-10-05 21:31:53 +01:00
committed by GitHub
parent 6b6e98775f
commit b893d661b1
32 changed files with 47 additions and 191 deletions

View File

@@ -948,10 +948,7 @@ class FusedMoEModularKernel(torch.nn.Module):
"""
a1 = hidden_states
if inplace and self.shared_experts is None:
output = a1
else:
output = torch.zeros_like(a1)
output = a1 if inplace and self.shared_experts is None else torch.zeros_like(a1)
local_num_experts = w1.size(0)
if global_num_experts == -1: