-
-
Notifications
You must be signed in to change notification settings - Fork 4
BUILD: Add Pyodide CI and build recipes #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@SwayamInSync Maybe it would be even better to upstream the SLEEF patches for Pyodide? That way, the Pyodide recipe would be patch-free (something that Pyodide is working towards as it will transition from a centralised distribution towards package authors building Pyodide wheels themselves), and this repo could have full control over the patches |
Means incorporate in quaddtype's build? |
Yes, exactly! I already copied over your patch (now in the 0003-... file), so something similar but so that the patches are only applied when building for Pyodide (if that's possible)? |
|
In principle it is possible, but will require good work, as similar dispatching mechanism as in #62 and modifying all the patches to include a conditional flag that turns those patches ON/OFF. Also I am not sure, but there might be an ordering to apply patches. But these all can be figured out. Once get sometime to look through the details. |
| diff --git a/src/libm/dispavx.c.org b/src/libm/dispavx.c.org | ||
| index 86a0148..e309af7 100644 | ||
| --- a/src/libm/dispavx.c.org | ||
| +++ b/src/libm/dispavx.c.org |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, I wonder 0003 patch and SLEEF's own autodetection should be enough to not dispatch these SIMD functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh maybe its because of cross-compilation, autodetection might fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auto detection doesn't exist at all in Emscripten (the instruction doesn't exist), so we need to fully patch them out, unfortunately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Autodetection is in SLEEF, it detects the properties by compiling code via the assigned compiler (very similar to what we do)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, we were talking about different detections then (compile time vs runtime). You can try it again without the patch - from what I remember, there was a link error with sleef's runtime detection, so some dispatch code must still be linked in
|
Lets keep this, I'll see if I can update it post v1 release |
That sounds like a good plan to me! |
This adds recipes and CI to check that numpy-quaddtype works in Pyodide.
Pyodide currently uses an old version of numpy, and building libsleef requires some Pyodide-specific patches (we could upstream them into meson in the future), so we cannot use the simpler https://github.com/numpy/numpy/blob/main/.github/workflows/emscripten.yml yet, so instead, this is my own home-cooked, more verbose one.