diff --git a/js/web/lib/wasm/jsep/webgpu/ops/skip-layer-norm.ts b/js/web/lib/wasm/jsep/webgpu/ops/skip-layer-norm.ts index e7dc34d2fc75d..1818963c187b8 100644 --- a/js/web/lib/wasm/jsep/webgpu/ops/skip-layer-norm.ts +++ b/js/web/lib/wasm/jsep/webgpu/ops/skip-layer-norm.ts @@ -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;' : ''}