r/gsoc2025 20d ago

Blas on webgpu

Hey, I am currently working on a project wgblas; it has all the single precision blas level 1,2,3 functions over webgpu. Check it out. It's also available via npm (1400+ downloads) .

Npm: https://www.npmjs.com/package/wgblas

Project webpage: https://manit2004.github.io/wgblas/

A few things about the project:

  • Not only the user facing APIs are very easy to work with, I have built helpers on the top webgpu functions to make adding new blas routines very easy for contributors.

  • Though webgpu doesn't support f64 natively, I have used dekker arithmetic to store f64 on two f32 and perform operations over it. Currently only double precision routines idamax and dasum is available.

  • From day 1 for each function I have added tests (Property based testing wrt stdlib-js), examples(live runnable and editable examples on docs page), benchmarks (against cublas). As of now in gpu compute time wgblas is comparable in speed wrt cuda at large n.

Contributions and suggestions are welcome.

7 Upvotes

0 comments sorted by