[Hybrid][torch.compile] Refactor mamba2 forward to avoid obscuring linear projections under custom op (#28587)
Signed-off-by: Tomer Asida <57313761+tomeras91@users.noreply.github.com>
This commit is contained in:
@@ -87,8 +87,7 @@ class Mamba2DecoderLayer(nn.Module):
|
||||
else:
|
||||
hidden_states, residual = self.norm(hidden_states, residual)
|
||||
|
||||
output = torch.empty_like(hidden_states)
|
||||
self.mixer(hidden_states, output)
|
||||
output = self.mixer(hidden_states)
|
||||
return output, residual
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user