-
Notifications
You must be signed in to change notification settings - Fork 240
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
[WIP] OpenBLAS and Numpy #671
Comments
This recipe seem to build successfully but there are still some things to be worked out.
The flags
|
It seems the numpy setup.py or cython were trying to build a test binary but the linker was not receiving Now I'm getting a duplicated symbol |
I think I made progress: duplicated_symbols.patch (numpy)
__init__.py (numpy)
But I don't know if just commenting out the source of In any case numpy still can't find openblas when deployed to a phone. I'm using this code to test.
|
It seems numpy can find openblas but it shows the host's path |
I don't yet have a recipe, I just drop the flang and openblas .a files under benchmark
|
I tried with pure numpy, Accelerate is included in the default kivy-ios project and even if numpy doesn't support it some stuff works and the symbols are there. |
Calling linalg.svd and linalg.eig causes a EXC_BAD_ACCESS. I'm using the examples from here. I will post more information later. I will try the examples on macos with openblas built with flang and hope I can replicate the crash. |
During the last ~2 months I got to what seems to be a working port of flang for iOS, but I still have to figure out how to make it work with numpy and kivy.
Here are the steps to get where I'm at, first build flang and openblas:
Make a kivy project:
mkdir kivy-OpenBLAS && cd kivy-OpenBLAS
python -m venv venv && . venv/bin/activate
git clone https://github.com/kivy/kivy-ios.git && pip install -e kivy-ios
You can make modification in the
kivy-ios/
folder and it will affect the installed kivy-ios.Create a new project as per usual:
toolchain build python3 kivy
Copy the openblas files to `dist/hostpython3/:
INSTALL/lib/libopenblas_armv8p-r0.3.19.dev.a
from the openblas folder todist/hostpython3/lib/libopenblas.a
. Note that you need to rename it.INSTALL/include
todist/hostpython3/include
So far openblas is only built for iOS therefore you will need to use
toolchain build numpy --arch arm64
to test numpy.To make changes to the numpy recipe simply edit
kivy-ios/kivy_ios/recipes/numpy/__init__.py
.My currently not working numpy recipe
All input is welcome!
The text was updated successfully, but these errors were encountered: