webmachinelearning / webnn-polyfill

🧠⚙️ Web Neural Network API polyfill based on TensorFlow.js
https://www.npmjs.com/package/@webmachinelearning/webnn-polyfill
Apache License 2.0
102 stars 18 forks source link

Fixed outputShape issue of convTranspose2d op by WebGL backend #178

Closed BruceDai closed 2 years ago

BruceDai commented 2 years ago

This PR is to fix #174.

WebNN-Polyfill WebGL backend is based on tf.js WebGL backend. When compiling graph by WebGL backend, tf.js WebGL backend would run WebGL program and save binary cache if the cache didn't exist, we happened to modify that outputShape previously for output of NCHW layout, then relevant saved binary cache was changed. This fixing is to protect saved cache from changes.

@huningxin @Honry PTAL, thanks.

BruceDai commented 2 years ago

Thanks @Honry. I'll merge it.