Skip to content

Commit 469fb7e

Browse files
authoredMar 20, 2025··
[JSEP] handles edge case in gridsample operator (#24121)
fix for #24070
1 parent 9922d48 commit 469fb7e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎js/web/lib/wasm/jsep/webgpu/ops/grid-sample.ts

+2
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ const pixelAtGrid = (input: IndicesHelper, dataType: string, attributes: GridSam
126126
if (r >= 0 && r < H && c >=0 && c < W) {
127127
indices[${idxH}] = u32(r);
128128
indices[${idxW}] = u32(c);
129+
} else {
130+
return ${dataType}(0);
129131
}
130132
`;
131133
case 'border':

0 commit comments

Comments
 (0)
Please sign in to comment.