Skip to content

Commit

Permalink
[NPU] Fix abnormal output with latest driver (#12530)
Browse files Browse the repository at this point in the history
  • Loading branch information
plusbang authored Dec 12, 2024
1 parent ffce86d commit f36c236
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def layer_norm(self, hidden_states, layernorm_weight):
)
eps = self.constant(self.rms_norm_eps)
hidden_states = self.eltwise_div(hidden_states, self.sqrt(self.eltwise_add(variance, eps)))
layernorm_weight = self.convert_to_fp32(layernorm_weight)
hidden_states = self.convert_to_fp16(hidden_states)
hidden_states = self.eltwise_mul(layernorm_weight, hidden_states)
hidden_states = self.convert_to_fp16(hidden_states)
return hidden_states
Expand Down

0 comments on commit f36c236

Please sign in to comment.