-
Notifications
You must be signed in to change notification settings - Fork 2
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
Port upstream NumPy 1.25.0 #1
Conversation
d4d24fd
to
48af955
Compare
Signed-off-by: Andrei Tatar <andrei@unikraft.io>
This work is based off NumPy 1.25.0, configured on a Linux x86_64 machine and adapted to work with unikraft. Hardware acceleration assumes x86_64 and is dispatched at runtime. ARM support requires future work. Files under `generated/` are created by the upstream build process from templates; we include these files verbatim for the unikraft build. Any potential patches should be clearly marked to ease future updates. Files under `importfix/` are correctly namespaced wrapper modules for any binary modules that we compile and link into unikraft, and must be copied over to the python rootfs. Selecting this library will add its files to the python rootfs build. Signed-off-by: Andrei Tatar <andrei@unikraft.io>
GCC < 12 and clang < 14 do not support certain x86 ISA extensions used in runtime dispatch targets. This change conditions compiling these targets on compiler version. Signed-off-by: Andrei Tatar <andrei@unikraft.io>
48af955
to
75a7382
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.
All good @andreittr, thank you.
I'll add the tag after the x86 instrinsics
pr is merged.
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.
All good with me. I tested with gcc12 and clang15. Thanks @andreittr for this monstrous effort!
Reviewed-by: Radu Nichita radunichita99@gmail.com
One small request, @andreittr: could you please add compiler version checks in the Makefile.uk (similar to what it is in the Unikraft Makefile). You can see a similar discussion here. |
Do we have versions that are known to be too old to build numpy but newer than the ones in main Unikraft? Because I wouldn't want to error out just on a guess/the extent to which we've tested. |
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.
Reviewed-by: Stefan Jumarea stefanjumarea02@gmail.com
Re: this, currently investigating an issue building with gcc 11, but it has to do with x86 intrinsics more broadly; so not really a numpy issue, will fix in edit: intrinsics fix in following PR:
|
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.
Approved-by: Razvan Deaconescu razvand@unikraft.io
Signed-off-by: Andrei Tatar <andrei@unikraft.io> Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com> Reviewed-by: Radu Nichita <radunichita99@gmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> GitHub-Closes: #1
This work is based off NumPy 1.25.0, configured on a Linux x86_64 machine and adapted to work with unikraft. Hardware acceleration assumes x86_64 and is dispatched at runtime. ARM support requires future work. Files under `generated/` are created by the upstream build process from templates; we include these files verbatim for the unikraft build. Any potential patches should be clearly marked to ease future updates. Files under `importfix/` are correctly namespaced wrapper modules for any binary modules that we compile and link into unikraft, and must be copied over to the python rootfs. Selecting this library will add its files to the python rootfs build. Signed-off-by: Andrei Tatar <andrei@unikraft.io> Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com> Reviewed-by: Radu Nichita <radunichita99@gmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> GitHub-Closes: #1
GCC < 12 and clang < 14 do not support certain x86 ISA extensions used in runtime dispatch targets. This change conditions compiling these targets on compiler version. Signed-off-by: Andrei Tatar <andrei@unikraft.io> Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com> Reviewed-by: Radu Nichita <radunichita99@gmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> GitHub-Closes: #1
This change set ports the popular NumPy python extension to unikraft at upstream version 1.25.0, along with necessary compatibility patches.
This is part of a larger work and depends on Python 3.10
and all its dependencies; plus a patch to register numpy modules:
In addition:
Libs used for build: