Skip to content

Commit

Permalink
fix fp16 for skiplayernorm (#20381)
Browse files Browse the repository at this point in the history
  • Loading branch information
guschmue authored Apr 19, 2024
1 parent 42b700d commit 497a627
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/web/lib/wasm/jsep/webgpu/ops/skip-layer-norm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const createSkipLayerNormProgramInfo =
var squareSum = ${fillVector('f32', components)};
for (var i: u32 = 0; i < hidden_size_vectorized; i++) {
let skip_value = skip[offset + i];
let bias_value = ${hasBiasInput ? 'bias[i]' : '0.0'};
let bias_value = ${hasBiasInput ? 'bias[i]' : dataType + '(0.0)'};
let input_value = x[offset + i];
let value = input_value + skip_value + bias_value;
${hasInputSkipBiasSumOutput ? 'input_skip_bias_sum[offset + i] = value;' : ''}
Expand Down

0 comments on commit 497a627

Please sign in to comment.