Closed BruceDai closed 5 years ago
This issue is not reproduced on Mac OS platform. @sunlin-link PTAL
This issue is also reproduced by Chrome (68.0.3440.91), so it's relevant to the changed code of webgl, we will bisect the commit.
console log says:
webml-polyfill.js:955 Uncaught (in promise) Error: [Tensor] numSlices 22 > MAX_TEXTURE_IMAGE_UNITS 16
at Tensor._createTextureSlices (webml-polyfill.js:955)
at Tensor.createGLTexture (webml-polyfill.js:888)
at Input.call (webml-polyfill.js:21574)
at webml-polyfill.js:8169
at Map.forEach (
The root case is that in https://github.com/intel/webml-polyfill/blob/master/src/nn/webgl2/Tensor.js#L119
L119 const numSlices = Math.ceil(this.textureShape[0] / webgl2.MAX_TEXTURE_SIZE);
L120 if (numSlices > webgl2.MAX_TEXTURE_IMAGE_UNITS) {
L121 throw new Error(`[Tensor] numSlices ${numSlices} > MAX_TEXTURE_IMAGE_UNITS ${webgl2.MAX_TEXTURE_IMAGE_UNITS}`);
L122 }
On Android platform webgl2.MAX_TEXTURE_SIZE is 4096 while on Windows and Mac OS platforms webgl2.MAX_TEXTURE_SIZE both are 16384
So execution on Android platform, the #L120 if condition would be satisfied, then error would be thrown.
Hi @BruceDai , I remove this check code via #215 , could you please help verify whether the result is correct?
Fixed by #215.
Verified this with the latest codes, it can't reproduce.