mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-31 23:27:43 +00:00
[js/webgpu] minor fixes to make tinyllama work (#19564)
This commit is contained in:
parent
aec2389ad0
commit
bb43a0f133
2 changed files with 4 additions and 2 deletions
|
|
@ -154,7 +154,9 @@ const createConcatProgramInfo = (inputs: readonly TensorView[], axis: number): P
|
|||
|
||||
export const concat = (context: ComputeContext, attributes: ConcatAttributes): void => {
|
||||
validateInputs(context.inputs);
|
||||
context.compute(createConcatProgramInfo(context.inputs, attributes.axis));
|
||||
// 0 length tensors are valid for concat, remove them
|
||||
const nonEmptyInputs = context.inputs.filter(input => ShapeUtil.size(input.dims) > 0);
|
||||
context.compute(createConcatProgramInfo(nonEmptyInputs, attributes.axis), {inputs: nonEmptyInputs});
|
||||
};
|
||||
|
||||
export const parseConcatAttributes = (attributes: Record<string, unknown>): ConcatAttributes =>
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ const createGatherProgramInfo = (inputs: readonly TensorView[], attributes: Gath
|
|||
if (idx${x} < 0) {
|
||||
idx${x} = idx${x} + uniforms.axisDimLimit;
|
||||
}
|
||||
var dataIndices${x} = ${data.type.indices}(0);
|
||||
var dataIndices${x} : ${data.type.indices};
|
||||
`;
|
||||
for (let i = 0, j = 0; i < inputRank; i++) {
|
||||
if (i === axis) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue