-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Webgpu gather zero #6166
Webgpu gather zero #6166
Conversation
const userCode = ` | ||
${getMainHeaderAndGlobalIndexString()} | ||
if (index < uniforms.size) { | ||
let resRC = getCoordsFromIndex(index); | ||
setOutputAtIndex(index, getA(${sourceCoords})); | ||
let indexZ = i32(getIndices(resRC.x, resRC.z)); | ||
let inBounds = select(0.0, 1.0, indexZ >= 0 && indexZ < ${this.aShape[2]}); |
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.
Can you directly use indexZ < aShape[2]
instead of indexZ < ${this.aShape[2]}
? I think aShape is already a uniform value. In this case, you don't need to change the shaderKey
.
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.
Thanks. Done.
72d5f05
to
8bae974
Compare
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 for the webgpu part.
@lina128 Can you take a look whether it's ok to put the common gpu test to tfjs-core?
@lina128 @mattsoulanille Do you think this is appropriate to move case to core test gather_test.ts? https://github.com/tensorflow/tfjs/pull/6166/files#diff-d04767f708ca30f31465a8848e7175c5646384caa1940f0cd68543953a7038d8 |
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
Reviewable status:
complete! 1 of 1 approvals obtained (waiting on @qjia7)
To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.
This change is