Implementing Matrix Multiplication with WebGPU in Safari

Implementing Matrix Multiplication with WebGPU in Safari

This is a quick overview of how to write a matrix multiplication for Safari leveraging the WebGPU API. This will run on both Macs and iPhones provided WebGPU is enabled.

The benchmarks in this document are done on an M1 chip.

The full code can be found here and a demo here.

https://jott.live/markdown/webgpu_safari

This thread was posted by one of our members via one of our news source trackers.

Corresponding tweet for this thread:

https://twitter.com/dev_talk/status/1360275659101265920

Share link for this tweet.

This reminded me about Safari’s ‘experimental features’ options (Develop > Experimental Features)- just enabled WebGPU and HTTP/3 :nerd_face:

For some HTML5 technologies Safari is like the old IE6, but in 2021.

1 Like

That’s very true Paul - I’ve been hearing that more and more over the last few years :rofl: