[js/webgpu] fix maxpool / fp16 (#19981)

This commit is contained in:
Guenther Schmuelling 2024-03-19 16:15:49 -07:00 committed by GitHub
parent 597e828aae
commit c45cff60cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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),
};
};