Unverified Commit af8c4737 authored by Arturo Ghinassi's avatar Arturo Ghinassi Committed by GitHub
Browse files

Cast input to weights type for AMP support

parent a31fcc55
......@@ -70,7 +70,7 @@ class FMoELinear(nn.Module):
r"""
Call MOE function
"""
x = MOELinear.apply(inp, fwd_expert_count, self.weight, self.bias)
x = MOELinear.apply(inp.type_as(self.weight), fwd_expert_count, self.weight, self.bias)
return x
def extra_repr(self) -> str:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment