Skip to content
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] Fix shader key for ScatterProgram #7932

Merged
merged 10 commits into from
Sep 25, 2023
5 changes: 3 additions & 2 deletions tfjs-backend-webgpu/src/scatter_webgpu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ export class ScatterProgram implements WebGPUProgram {
this.dispatch =
computeDispatch(this.dispatchLayout, flattenXShape, this.workgroupSize);
this.sliceDimGreaterThanOne = sliceDim > 1;
this.shaderKey = `scatter_${indicesRank}_${updatesRank}_${
this.sliceDimGreaterThanOne}_${outputDtype}_${sumDupeIndices}`;
this.shaderKey =
`scatter_${indicesRank}_${updatesRank}_${this.sliceDimGreaterThanOne}_${
outputDtype}_${sumDupeIndices}_${strides.length}`;
const stridesType = getCoordsDataType(strides.length);
this.uniforms =
`sliceDim : i32, strides: ${stridesType}, updatesSize: i32,`;
Expand Down