mil-tokyo / webdnn

The Fastest DNN Running Framework on Web Browser
https://mil-tokyo.github.io/webdnn
Other
1.98k stars 146 forks source link

Any one could explain the differences between "WebGL via Metal" vs. "WebGPU" on iOS? #951

Open odieXin opened 2 years ago

odieXin commented 2 years ago

WebGPU was an experimental feature on iOS 11 and 12. WebGL via Metal is the latest option with iOS 15 and Mac OS as well. Can someone explain their differences? @milhidaka

milhidaka commented 2 years ago

The two are completely different. WebGL via Metal exposes a WebGL interface to JavaScript applications; there is an overhead to convert WebGL instructions to native GPU instructions. WebGPU, implemented in iOS 11, exposes a new interface for using the GPU. It is a thin wrapper for Metal and can achieve relatively high performance. Because Metal is an Apple-specific technology, it was not ported to other platforms. We don't know the exact reason, but WebGPU was removed in iOS15. Once the WebGPU standard is established as friendly to all platforms, we expect to see WebGPU implemented in iOS again.

odieXin commented 2 years ago

Thanks @milhidaka for the detailed explanation!