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

[JS/WebGPU] Preserve zero size input tensor dims. #19737

Merged
merged 12 commits into from
Mar 8, 2024
Prev Previous commit
Next Next commit
Fixed comment
  • Loading branch information
satyajandhyala committed Mar 7, 2024
commit 971b6121a97bcc7b6248ab8245813f8edbe26296
3 changes: 0 additions & 3 deletions js/web/lib/wasm/jsep/webgpu/ops/concat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,7 @@ const createConcatProgramInfo =
};

export const concat = (context: ComputeContext, attributes: ConcatAttributes): void => {
// find a none zero tensor as reference to determine the output shape
// choose input 0 as reference if all input tensors are zero-sized.
const inputs = context.inputs;

const inputShape = inputs[0].dims;
const adjustedAxis = attributes.axis + (attributes.axis < 0 ? inputShape.length : 0);
validateInputs(inputs, adjustedAxis);
Expand Down
Loading