-
Notifications
You must be signed in to change notification settings - Fork 1
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
mpi4torch may be built against a different pytorch version than present in the venv #7
Comments
Although mpi4torch is not distributed as binary wheel files, pip's behavior regarding build isolation and caching can lead to situations in which mpi4torch is build against a different pytorch version than the one present at installation time. This partially addresses issue #7.
Commit 505ddd9 only partially fixes this issue. The commit enforces the built-time torch version in the to-be-installed binary wheel, thus removing the ABI incompatibility. This way the segfault is removed, but it may still lead to potential versioning conflicts during install. And in fact this is not hypothetical.
can, due to a combination of build isolation and unfortunate caching, still yield to versioning conflicts
Ideally In theory, PEP517 allows for custom in-tree build systems which can be used to dynamically generate the version requirement of the build-dependencies, as illustrated here. However, it is unclear to me how this is best used. To be continued ... |
As far as I can tell this is pypa/pip#9542 . Scipy devs face a similar situation with ABI compatibility to numpy and they crafted the |
Related to #5: pip seems to utilize its own installation of pytorch to build mpi4torch, no matter which version is present in the virtual environment.
This has the sideeffect that installing
heat==1.2.0
, which requirestorch<=1.11.0
and then installing mpi4torch leads to unresolved symbols, once one tries to load mpi4torch, since pip will pull a newer version of torch to build mpi4torch.Steps to reproduce in a fresh virtual environment:
The latter will result (with
torch=1.12.1
being used for the build) in:which is reasonable since this was changed between 1.11 and 1.12.
The text was updated successfully, but these errors were encountered: