File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
js/web/lib/wasm/jsep/webgpu/ops Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,6 @@ const createWhereOpProgramInfo = (inputs: readonly TensorView[]): ProgramInfo =>
7676 const isBroadcast = ! ( ShapeUtil . areEqual ( dimsA , dimsB ) && ShapeUtil . areEqual ( dimsB , dimsC ) ) ;
7777 let outputShape = dimsA ;
7878 let outputSize = ShapeUtil . size ( dimsA ) ;
79- const vecSize = Math . ceil ( outputSize / 4 ) ;
8079 // TODO: deal with zero-sized tensors (eg. dims=[1,0])
8180
8281 if ( isBroadcast ) {
@@ -88,6 +87,8 @@ const createWhereOpProgramInfo = (inputs: readonly TensorView[]): ProgramInfo =>
8887 outputSize = ShapeUtil . size ( outputShape ) ;
8988 }
9089
90+ const vecSize = Math . ceil ( outputSize / 4 ) ;
91+
9192 return {
9293 name : 'Where' ,
9394 shaderCache : { inputDependencies : [ 'rank' , 'rank' , 'rank' ] } ,
You can’t perform that action at this time.
0 commit comments