Skip to content

Commit

Permalink
Check if the axis is with in the range.
Browse files Browse the repository at this point in the history
  • Loading branch information
satyajandhyala committed Mar 8, 2024
1 parent 971b612 commit adfca56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/web/lib/wasm/jsep/webgpu/ops/concat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ const createConcatProgramInfo =
export const concat = (context: ComputeContext, attributes: ConcatAttributes): void => {
const inputs = context.inputs;
const inputShape = inputs[0].dims;
const adjustedAxis = attributes.axis + (attributes.axis < 0 ? inputShape.length : 0);
const adjustedAxis = ShapeUtil.normalizeAxis(attributes.axis, inputShape.length);
validateInputs(inputs, adjustedAxis);
const outputShape = inputShape.slice();
outputShape[adjustedAxis] =
Expand Down

0 comments on commit adfca56

Please sign in to comment.