Skip to content

Commit

Permalink
[js/webgpu] fix maxpool / fp16 (microsoft#19981)
Browse files Browse the repository at this point in the history
  • Loading branch information
guschmue authored and Ted Themistokleous committed May 7, 2024
1 parent 27d04f5 commit f3c3398
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/web/lib/wasm/jsep/webgpu/ops/pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,9 @@ const createMaxPoolProgramInfo =
programUniforms
}),
getShaderSource: shaderHelper => generatePoolingCode(
shaderHelper, x, input.dims.length, outputShape.length, adjustedAttributes, op1, op2, -1e5, uniforms,
hasPads, pwStartEndNotZero, phStartEndNotZero),
shaderHelper, x, input.dims.length, outputShape.length, adjustedAttributes, op1, op2,
(input.dataType === DataType.float16) ? -65504 : -1e5, uniforms, hasPads, pwStartEndNotZero,
phStartEndNotZero),
};
};

Expand Down

0 comments on commit f3c3398

Please sign in to comment.