Skip to content

Using WASM OpenBLAS and SIMD-enabled builds for NumPy in Pyodide #14

@agriyakhetarpal

Description

@agriyakhetarpal

In Pyodide, we have started experimenting with SIMD integrations in our recent releases (see pyodide/pyodide#5960, https://blog.pyodide.org/posts/0.29-release/#simd-support-exploration) to extract better performance as SIMD is now standardised in web browsers.

@lesteve and I plan to spend some time exploring the use of OpenBLAS instead of LAPACK-Lite for NumPy, whether during the summit or in its aftermath.

We can document the following aspects in a packages/numpy/performance.md file next to the recipe:

  • how to enable SIMD if someone were to compile their own NumPy from source for Pyodide/WASM (and WASI, when the WASI SDK in CPython is upgraded to newer versions),
  • run a few basic benchmarks across SIMD-accelerated public API methods (mostly the different types of sorting functions) taken from the - benchmark suite. asv isn't compiled for WASM yet, so this would mostly be a bunch of hacky scripts I put together
  • any performance speedups and downgrades as noticed on our machines in WASM in comparison to a non-SIMD NumPy

I am aware that this topic might loosely fit under the criterion listed at https://scientific-python.org/summits/developer/

Focus on issues with cross-project impact, rather than narrowly scoped tasks that impact only a single package or work that one person could reasonably pursue independently.

And thus, we plan to work on this only if we have some bonus time outside of the current goals :) This will be beneficial to NumPy, SciPy, and scikit-learn, all of which implement interactive documentation – although speed is not something we have had in consideration for such a runtime.

cc: @hoodmane @ryanking13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions