mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-29 20:14:01 +00:00
[js/webgpu] fix bcast in where (#19009)
This commit is contained in:
parent
53497702a6
commit
d0bac8216d
1 changed files with 2 additions and 1 deletions
|
|
@ -76,7 +76,6 @@ const createWhereOpProgramInfo = (inputs: readonly TensorView[]): ProgramInfo =>
|
|||
const isBroadcast = !(ShapeUtil.areEqual(dimsA, dimsB) && ShapeUtil.areEqual(dimsB, dimsC));
|
||||
let outputShape = dimsA;
|
||||
let outputSize = ShapeUtil.size(dimsA);
|
||||
const vecSize = Math.ceil(outputSize / 4);
|
||||
// TODO: deal with zero-sized tensors (eg. dims=[1,0])
|
||||
|
||||
if (isBroadcast) {
|
||||
|
|
@ -88,6 +87,8 @@ const createWhereOpProgramInfo = (inputs: readonly TensorView[]): ProgramInfo =>
|
|||
outputSize = ShapeUtil.size(outputShape);
|
||||
}
|
||||
|
||||
const vecSize = Math.ceil(outputSize / 4);
|
||||
|
||||
return {
|
||||
name: 'Where',
|
||||
shaderCache: {inputDependencies: ['rank', 'rank', 'rank']},
|
||||
|
|
|
|||
Loading…
Reference in a new issue