Skip to content

Commit

Permalink
Fix MLTensorUsage is not defined issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ibelem committed Nov 14, 2024
1 parent 6d0fed2 commit 4bd147a
Show file tree
Hide file tree
Showing 31 changed files with 8,793 additions and 9,767 deletions.
270 changes: 143 additions & 127 deletions assets/dist/ort-wasm-simd-threaded.jsep.mjs

Large diffs are not rendered by default.

Binary file modified assets/dist/ort-wasm-simd-threaded.jsep.wasm
Binary file not shown.
4 changes: 2 additions & 2 deletions assets/dist/ort-wasm-simd-threaded.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var La=[],Ma=[],Na=[],N=0,Oa=null,O=null;function Pa(){N--;if(0==N&&(null!==Oa&&
function Ta(a){if(!J&&(la||C)){if("function"==typeof fetch&&!ta(a))return fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw`failed to load wasm binary file at '${a}'`;return b.arrayBuffer()}).catch(()=>Sa(a));if(qa)return new Promise((b,c)=>{qa(a,d=>b(new Uint8Array(d)),c)})}return Promise.resolve().then(()=>Sa(a))}function Ua(a,b,c){return Ta(a).then(d=>WebAssembly.instantiate(d,b)).then(c,d=>{H(`failed to asynchronously prepare wasm: ${d}`);P(d)})}
function Va(a,b){var c=Ra;return J||"function"!=typeof WebAssembly.instantiateStreaming||Qa(c)||ta(c)||D||"function"!=typeof fetch?Ua(c,a,b):fetch(c,{credentials:"same-origin"}).then(d=>WebAssembly.instantiateStreaming(d,a).then(b,function(g){H(`wasm streaming compile failed: ${g}`);H("falling back to ArrayBuffer instantiation");return Ua(c,a,b)}))}
function Aa(){Wa={j:Xa,b:Ya,E:Za,g:$a,V:ab,A:bb,C:cb,W:db,T:eb,L:fb,S:gb,o:hb,B:ib,y:jb,U:kb,z:lb,_:mb,Z:nb,P:ob,w:pb,F:qb,k:rb,O:Ca,Y:sb,I:tb,J:ub,K:vb,G:wb,H:xb,v:yb,q:zb,l:Ab,p:Bb,e:Cb,X:Db,x:Eb,d:Fb,f:Gb,i:Hb,u:Ib,t:Jb,s:Kb,Q:Lb,R:Mb,D:Nb,h:Ob,n:Pb,M:Qb,m:Rb,a:l,r:Sb,N:Tb,c:Ub};return{a:Wa}}
var Vb={842196:(a,b,c,d,g)=>{if("undefined"==typeof y||!y.Ua)return 1;a=Q(Number(a>>>0));a.startsWith("./")&&(a=a.substring(2));a=y.Ua.get(a);if(!a)return 2;b=Number(b>>>0);c=Number(c>>>0);d=Number(d>>>0);if(b+c>a.byteLength)return 3;try{const h=a.subarray(b,b+c);switch(g){case 0:r().set(h,d>>>0);break;case 1:y.mb(d,h);break;default:return 4}return 0}catch{return 4}},842911:()=>"undefined"!==typeof wasmOffsetConverter};function Xa(){return"undefined"!==typeof wasmOffsetConverter}
var Vb={836468:(a,b,c,d,g)=>{if("undefined"==typeof y||!y.Ua)return 1;a=Q(Number(a>>>0));a.startsWith("./")&&(a=a.substring(2));a=y.Ua.get(a);if(!a)return 2;b=Number(b>>>0);c=Number(c>>>0);d=Number(d>>>0);if(b+c>a.byteLength)return 3;try{const h=a.subarray(b,b+c);switch(g){case 0:r().set(h,d>>>0);break;case 1:y.mb(d,h);break;default:return 4}return 0}catch{return 4}},837183:()=>"undefined"!==typeof wasmOffsetConverter};function Xa(){return"undefined"!==typeof wasmOffsetConverter}
function Wb(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a}
var Xb=a=>{a.terminate();a.onmessage=()=>{}},$b=a=>{0==R.length&&(Yb(),Zb(R[0]));var b=R.pop();if(!b)return 6;S.push(b);T[a.Ra]=b;b.Ra=a.Ra;var c={cmd:"run",start_routine:a.cb,arg:a.ab,pthread_ptr:a.Ra};D&&b.unref();b.postMessage(c,a.ib);return 0},U=0,V=(a,b,...c)=>{for(var d=2*c.length,g=dc(),h=ec(8*d),k=h>>>3,q=0;q<c.length;q++){var z=c[q];"bigint"==typeof z?(M[k+2*q]=1n,M[k+2*q+1]=z):(M[k+2*q]=0n,x()[k+2*q+1>>>0]=z)}a=fc(a,0,d,h,b);gc(g);return a};
function Sb(a){if(E)return V(0,1,a);L=a;if(!(0<U)){for(var b of S)Xb(b);for(b of R)Xb(b);R=[];S=[];T=[];Ka=!0}oa(a,new Wb(a))}function hc(a){if(E)return V(1,0,a);Nb(a)}var Nb=a=>{L=a;if(E)throw hc(a),"unwind";Sb(a)},R=[],S=[],ic=[],T={};function jc(){for(var a=y.numThreads-1;a--;)Yb();La.unshift(()=>{N++;kc(()=>Pa())})}var mc=a=>{var b=a.Ra;delete T[b];R.push(a);S.splice(S.indexOf(a),1);a.Ra=0;lc(b)};function Ea(){ic.forEach(a=>a())}
Expand Down Expand Up @@ -63,7 +63,7 @@ var Bc=[Sb,hc,uc,$a,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,lb,wb,xb,Lb,Mb,Ob,Pb,Qb,Rb]
y._OrtAddSessionConfigEntry=(a,b,c)=>(y._OrtAddSessionConfigEntry=Z.fa)(a,b,c);y._OrtReleaseSessionOptions=a=>(y._OrtReleaseSessionOptions=Z.ga)(a);y._OrtCreateSession=(a,b,c)=>(y._OrtCreateSession=Z.ha)(a,b,c);y._OrtReleaseSession=a=>(y._OrtReleaseSession=Z.ia)(a);y._OrtGetInputOutputCount=(a,b,c)=>(y._OrtGetInputOutputCount=Z.ja)(a,b,c);y._OrtGetInputName=(a,b)=>(y._OrtGetInputName=Z.ka)(a,b);y._OrtGetOutputName=(a,b)=>(y._OrtGetOutputName=Z.la)(a,b);y._OrtFree=a=>(y._OrtFree=Z.ma)(a);
y._OrtCreateTensor=(a,b,c,d,g,h)=>(y._OrtCreateTensor=Z.na)(a,b,c,d,g,h);y._OrtGetTensorData=(a,b,c,d,g)=>(y._OrtGetTensorData=Z.oa)(a,b,c,d,g);y._OrtReleaseTensor=a=>(y._OrtReleaseTensor=Z.pa)(a);y._OrtCreateRunOptions=(a,b,c,d)=>(y._OrtCreateRunOptions=Z.qa)(a,b,c,d);y._OrtAddRunConfigEntry=(a,b,c)=>(y._OrtAddRunConfigEntry=Z.ra)(a,b,c);y._OrtReleaseRunOptions=a=>(y._OrtReleaseRunOptions=Z.sa)(a);y._OrtCreateBinding=a=>(y._OrtCreateBinding=Z.ta)(a);
y._OrtBindInput=(a,b,c)=>(y._OrtBindInput=Z.ua)(a,b,c);y._OrtBindOutput=(a,b,c,d)=>(y._OrtBindOutput=Z.va)(a,b,c,d);y._OrtClearBoundOutputs=a=>(y._OrtClearBoundOutputs=Z.wa)(a);y._OrtReleaseBinding=a=>(y._OrtReleaseBinding=Z.xa)(a);y._OrtRunWithBinding=(a,b,c,d,g)=>(y._OrtRunWithBinding=Z.ya)(a,b,c,d,g);y._OrtRun=(a,b,c,d,g,h,k,q)=>(y._OrtRun=Z.za)(a,b,c,d,g,h,k,q);y._OrtEndProfiling=a=>(y._OrtEndProfiling=Z.Aa)(a);var I=()=>(I=Z.Ba)();y._free=a=>(y._free=Z.Ca)(a);y._malloc=a=>(y._malloc=Z.Da)(a);
var Ba=(a,b,c,d,g,h)=>(Ba=Z.Ga)(a,b,c,d,g,h),Ia=()=>(Ia=Z.Ha)(),fc=(a,b,c,d,g)=>(fc=Z.Ia)(a,b,c,d,g),lc=a=>(lc=Z.Ja)(a),Ga=a=>(Ga=Z.Ka)(a),zc=()=>(zc=Z.La)(),oc=(a,b)=>(oc=Z.Ma)(a,b),gc=a=>(gc=Z.Na)(a),ec=a=>(ec=Z.Oa)(a),dc=()=>(dc=Z.Pa)();y.___start_em_js=842968;y.___stop_em_js=843029;
var Ba=(a,b,c,d,g,h)=>(Ba=Z.Ga)(a,b,c,d,g,h),Ia=()=>(Ia=Z.Ha)(),fc=(a,b,c,d,g)=>(fc=Z.Ia)(a,b,c,d,g),lc=a=>(lc=Z.Ja)(a),Ga=a=>(Ga=Z.Ka)(a),zc=()=>(zc=Z.La)(),oc=(a,b)=>(oc=Z.Ma)(a,b),gc=a=>(gc=Z.Na)(a),ec=a=>(ec=Z.Oa)(a),dc=()=>(dc=Z.Pa)();y.___start_em_js=837240;y.___stop_em_js=837301;
function Pc(){var a=Z;a=Object.assign({},a);var b=d=>()=>d()>>>0,c=d=>g=>d(g)>>>0;a.Ba=b(a.Ba);a.Da=c(a.Da);a.emscripten_main_runtime_thread_id=b(a.emscripten_main_runtime_thread_id);a.Oa=c(a.Oa);a.Pa=b(a.Pa);return a}y.stackSave=()=>dc();y.stackRestore=a=>gc(a);y.stackAlloc=a=>ec(a);
y.setValue=function(a,b,c="i8"){c.endsWith("*")&&(c="*");switch(c){case "i1":f()[a>>>0]=b;break;case "i8":f()[a>>>0]=b;break;case "i16":ba()[a>>>1>>>0]=b;break;case "i32":u()[a>>>2>>>0]=b;break;case "i64":M[a>>>3]=BigInt(b);break;case "float":fa()[a>>>2>>>0]=b;break;case "double":x()[a>>>3>>>0]=b;break;case "*":v()[a>>>2>>>0]=b;break;default:P(`invalid type for setValue: ${c}`)}};
y.getValue=function(a,b="i8"){b.endsWith("*")&&(b="*");switch(b){case "i1":return f()[a>>>0];case "i8":return f()[a>>>0];case "i16":return ba()[a>>>1>>>0];case "i32":return u()[a>>>2>>>0];case "i64":return M[a>>>3];case "float":return fa()[a>>>2>>>0];case "double":return x()[a>>>3>>>0];case "*":return v()[a>>>2>>>0];default:P(`invalid type for getValue: ${b}`)}};y.UTF8ToString=Q;y.stringToUTF8=W;y.lengthBytesUTF8=xc;var Qc;O=function Rc(){Qc||Sc();Qc||(O=Rc)};
Expand Down
Binary file modified assets/dist/ort-wasm-simd-threaded.wasm
Binary file not shown.
2,130 changes: 1,040 additions & 1,090 deletions assets/dist/ort.all.bundle.min.mjs

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions assets/dist/ort.all.bundle.min.mjs.map

Large diffs are not rendered by default.

Loading

0 comments on commit 4bd147a

Please sign in to comment.