Skip to content

Conversation

SwayamInSync
Copy link
Member

@SwayamInSync SwayamInSync commented Sep 5, 2025

Closes #107

This PR bundles the submodule QBLAS and dependency SLEEF within the package using meson wrap

This also simplifies the GitHub workflows @ngoldbaum please take a look, if setup looks good I'll try to do same with sleef

@SwayamInSync
Copy link
Member Author

My one wild guess is that sleef available on conds-forge is causing some issues with our tests so vendoring ours within sdist and building everything from there maybe solves them free

@JaRoSchm
Copy link

JaRoSchm commented Sep 5, 2025

Thank you for trying this! If someone else wants to have a look at the failure of one test using sleef from conda forge, please see conda-forge/numpy_quaddtype-feedstock#4
We are happy about every suggestion helping us to fix this.

@ngoldbaum
Copy link
Member

We are happy about every suggestion helping us to fix this.

If conda-forge is fine with this and doesn't want to unbundle SLEEF then I'm happy with this too. It's annoying to have to download and build SLEEF separately.

@SwayamInSync I'll try to review this soon.

@SwayamInSync SwayamInSync changed the title Vendoring submodules using meson wrap [sdist compatible] Bundle SLEEF and submodules using meson wrap [sdist compatible] Sep 6, 2025
@SwayamInSync
Copy link
Member Author

SwayamInSync commented Sep 6, 2025

Packaged the sleef as well, it simplified the user-side workflow by a lot, just build times got increased. We can use ccache for that but I think we are good with the current setup

@SwayamInSync
Copy link
Member Author

To include LISCENSE I just copied it to the quaddtype folder (I hope it's okay) I tried pointing to the outside's LISCENSE but that didn't work

@ngoldbaum
Copy link
Member

The README needs updates too, right? It would help me review if you update that too.

Moving a copy of the license file into this directory is fine.

@SwayamInSync
Copy link
Member Author

The README needs updates too, right? It would help me review if you update that too.

Sure, doing it.
Right now it is just python -m pip install . -v


python -m pip uninstall -y numpy_quaddtype
python -m build --sdist --outdir dist/
python -m pip install dist/numpy_quaddtype-0.1.0.tar.gz -v
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we avoid hard coding the version into the path?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done (although this is just a utility, @ngoldbaum let me know if you want to keep it)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reason behind that, you can't test both local build and sdist together as for changes to be visible in sdist we need to commit those changes first only then they get reflected and ready to test inside sdist. So I thought to do it separately.

@SwayamInSync
Copy link
Member Author

These new commits just add an additional testing on top of the built sdist, to install and run pytest

Copy link
Contributor

@juntyr juntyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot comment on the packaging and build details, but from a glance things look good to me

@SwayamInSync
Copy link
Member Author

@ngoldbaum can you take a look at this too please

@ngoldbaum
Copy link
Member

On it - just starting my day here!

Copy link
Member

@ngoldbaum ngoldbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! This is a huge usability improvement. I edited the PR description to include the string "closes #107" which will auto-close that issue when this PR is merged.

I have some suggestions for the readme, take 'em or leave 'em.

@SwayamInSync
Copy link
Member Author

@ngoldbaum after test passes, you can merge this and we can do another release so that me and @JaRoSchm can use these upstream changes to test on conda-forge

@ngoldbaum
Copy link
Member

It looks like this makes CI a lot slower, probably because SLEEF and QBLAS are getting rebuilt repeatedly. There's probably a way to add caching to avoid that.

@ngoldbaum
Copy link
Member

There's probably a way to add caching to avoid that.

Maybe just need to turn on ccache caching? https://github.com/hendrikmuhs/ccache-action

@SwayamInSync
Copy link
Member Author

It looks like this makes CI a lot slower, probably because SLEEF and QBLAS are getting rebuilt repeatedly. There's probably a way to add caching to avoid that.

I tried to use ccache here on linux SwayamInSync#11 didn't help much (or maybe I am doing it wrong) ~20 mins on linux (without ccache it was 16mins 😄 ) will surely look into it.
QBLAS is just header-only library, so directly exposed the templated APIs to use. SLEEF has a much bigger overhead because of dispatching and compiling

@ngoldbaum
Copy link
Member

I'm OK with temporarily making CI slow and merging this now but let's try to fix that before anyone else comes along and wants to experiment with a new dtype...

@SwayamInSync
Copy link
Member Author

I'm OK with temporarily making CI slow and merging this now but let's try to fix that before anyone else comes along and wants to experiment with a new dtype...

Yup, will play with the action you mentioned, it seem simpler than what I was doing

@ngoldbaum ngoldbaum merged commit 1d6e8eb into numpy:main Sep 8, 2025
7 checks passed
@juntyr
Copy link
Contributor

juntyr commented Sep 9, 2025

@ngoldbaum after test passes, you can merge this and we can do another release so that me and @JaRoSchm can use these upstream changes to test on conda-forge

Another release sounds good to me, perhaps we can wait until #145 is merged?

@SwayamInSync
Copy link
Member Author

Yes @juntyr I am waiting for that to merge and only then make a release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate vendoring SLEEF
4 participants