-
Notifications
You must be signed in to change notification settings - Fork 2k
webgpu: support maxPoolWithArgmax kernel #7176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
c94507d to
b6ae59e
Compare
|
@gyagp please help to review it, there is a pending patch that depends on it. |
b6ae59e to
bcc6b06
Compare
|
|
||
| this.shaderKey = `pool2D_${poolType}`; | ||
| if (computePositions) { | ||
| this.positionStr = flattenPositions ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, missed one nit: Please move positionStr to getUserCode.
| this.computePositions ? `var maxValue = 0.0; | ||
| var maxValueFound = 0.0; | ||
| var maxPosition = 0;` : | ||
| ''} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${
this.computePositions ? `var maxValue = 0.0;
var maxValueFound = 0.0;
var maxPosition = 0;` :
''}
var resultValue = ${
this.poolType === 'avg' ? '0.0' : '-1.0 / pow(10.0, -20.0)'};
var count = 0.0;
->
${
this.computePositions ? `var maxValue = 0.0;
var maxValueFound = 0.0;
var maxPosition = 0;` :
`
var resultValue = ${
this.poolType === 'avg' ? '0.0' : '-1.0 / pow(10.0, -20.0)'};
var count = 0.0;
`}
bcc6b06 to
dde80a7
Compare
gyagp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
dde80a7 to
be6f6b5
Compare
be6f6b5 to
412597b
Compare
To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.
This change is