-
Notifications
You must be signed in to change notification settings - Fork 80
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
Remove reliance on extension modules #394
Conversation
Need to specify the path to the built library since the user may not have specified `LD_LIBRARY_PATH`.
Similarly to what we do for finufft. The issue is that the default gcc config on certain OSes (Ubuntu 20.04, Rocky 8), libraries are not linked unless their symbols are explicitly referenced in the source. Since we have no source, no libraries are linked. The solution is to create a dummy source that just calls a single function `cufinufft_default_opts`.
Instead of living in the site-packages root, we put this in the `cufinufft` package, similarly to `finufft.
Just copies the shared object directly into the python package
95cd95a
to
ab69c11
Compare
ab69c11
to
4780cc9
Compare
4780cc9
to
4b7a7b4
Compare
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.
This looks good. Just feels a bit strange to include shared libraries as “data” files but seems to work.
Should we give finufft the same treatment, then?
already done in this PR
…On Tue, Dec 12, 2023 at 4:37 PM Joakim Andén ***@***.***> wrote:
***@***.**** approved this pull request.
This looks good. Just feels a bit strange to include shared libraries as
“data” files but seems to work.
Should we give finufft the same treatment, then?
—
Reply to this email directly, view it on GitHub
<#394 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACY7UWJV74WO7RW72VGUZDYJDFAVAVCNFSM6AAAAABARX3VWSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTONZYGQ3TONBYGE>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
Weird. Somehow missed it. Anyhow saw it now and it looks good. Tried making the binary wheels using the docker image for cufinufft. Everything looks good there too. One interesting consequence is that we're now independent of the CPython ABI(?). In other words, we only need to ship a single binary wheel |
you were blinded by all of my shiny force pushes
…On Tue, Dec 12, 2023 at 5:36 PM Joakim Andén ***@***.***> wrote:
already done in this PR
Weird. Somehow missed it. Anyhow saw it now and it looks good.
Tried making the binary wheels using the docker image for cufinufft.
Everything looks good there too. One interesting consequence is that we're
now independent of the CPython ABI(?). In other words, we only need to ship
a single binary wheel
cufinufft-2.2.0.dev0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
So that's a +1 for ctypes!
—
Reply to this email directly, view it on GitHub
<#394 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACY7UV4PLQLQHOPCNY2R7DYJDL5RAVCNFSM6AAAAABARX3VWSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJSHEZDEMBYGU>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
This still needs a bit of hardening for macs. In some instances macs get a |
Maybe related, but the wheel names are the same ( |
The python version is not encoded in name either. The master branch ci generates |
maybe it's fine, building extension module is python version dependent while ship with .so as data does not require python version? the .so, .dylib or .dll file may be os dependent, maybe there is a way to tell |
Right. Since we don't depend on the Python ABI, it makes sense that the wheel should be independent of Python version.
Yes this is an issue. Right now, Linux has a different tag ( |
6b1e013
to
0bb7251
Compare
I'm a little worried this may introduce new bugs that we don't completely have a handle on relatively close to a release. At the end of the day, the old way (C extension with rpath and friends) works except for certain corner cases and we expect most people to install the binary wheels anyhow where this wouldn't be an issue. Besides, wouldn't some of these issues (compiler incompatibility, etc.) be resolved once we move to scikit-build (integrating the library building inside the pip install process)? |
I'm not sure I'd recommend That said, I think I can get a handle on the bugs (I can actually test the binaries on a lot of platforms directly). If the wheels work, which is what this is mostly designed to deal with, then I don't see much of an issue with merging it. |
0bb7251
to
1103cbb
Compare
1103cbb
to
71f9be8
Compare
This will get taken care of by #429 |
closing this 2023 PR since superceded by #429 @janden @blackwer @lu1and10 @DiamonDinoia |
Following my frustrations at #389, I'm drafting this PR to just remove any extra shared library generation at install time for the python bindings. I'm basing this PR off of #393