Skip to content

Commit

Permalink
Check if the length of dims is > 0.
Browse files Browse the repository at this point in the history
  • Loading branch information
satyajandhyala committed Nov 5, 2023
1 parent d7bef41 commit bfdd2d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/web/lib/wasm/jsep/webgpu/ops/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -805,4 +805,4 @@ export const getBroadcastDims = (inShape: readonly number[], outShape: readonly
};

// TODO: remove this limitation once >4D dims are supported by uniform.
export const enableShapesUniforms = (rank: number): boolean => rank <= 4;
export const enableShapesUniforms = (rank: number): boolean => rank <= 4 && rank > 0;

0 comments on commit bfdd2d5

Please sign in to comment.