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 6, 2023
1 parent 47b04cb commit 0a43dcd
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 0a43dcd

Please sign in to comment.