Skip to content

Commit 4d0ff47

Browse files
authored
Make expand_as result contiguous in MllamaVisionEncoderLayer_forward (#3469)
1 parent c2a60d1 commit 4d0ff47

File tree

1 file changed

+1
-1
lines changed
  • intel_extension_for_pytorch/transformers/models/reference/modules

1 file changed

+1
-1
lines changed

intel_extension_for_pytorch/transformers/models/reference/modules/decoder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def MllamaVisionEncoderLayer_forward(
9898
hidden_state = self.gate_ffn.tanh() * hidden_state
9999
else:
100100
hidden_state = self.mlp_linear_mul(
101-
hidden_state, self.gate_ffn.tanh().expand_as(residual)
101+
hidden_state, self.gate_ffn.tanh().expand_as(residual).contiguous()
102102
)
103103
hidden_state = residual + hidden_state
104104
else:

0 commit comments

Comments
 (0)