Skip to content

Commit f3c3398

Browse files
guschmueTed Themistokleous
authored and
Ted Themistokleous
committed
[js/webgpu] fix maxpool / fp16 (microsoft#19981)
1 parent 27d04f5 commit f3c3398

File tree

1 file changed

+3
-2
lines changed
  • js/web/lib/wasm/jsep/webgpu/ops

1 file changed

+3
-2
lines changed

js/web/lib/wasm/jsep/webgpu/ops/pool.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,9 @@ const createMaxPoolProgramInfo =
381381
programUniforms
382382
}),
383383
getShaderSource: shaderHelper => generatePoolingCode(
384-
shaderHelper, x, input.dims.length, outputShape.length, adjustedAttributes, op1, op2, -1e5, uniforms,
385-
hasPads, pwStartEndNotZero, phStartEndNotZero),
384+
shaderHelper, x, input.dims.length, outputShape.length, adjustedAttributes, op1, op2,
385+
(input.dataType === DataType.float16) ? -65504 : -1e5, uniforms, hasPads, pwStartEndNotZero,
386+
phStartEndNotZero),
386387
};
387388
};
388389

0 commit comments

Comments
 (0)