profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/samueljohn/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Samuel John samueljohn OtoJig GmbH Germany https://otojig.com CEO OtoJig

samueljohn/Homebrew-formula-syntax 38

Sublime Text Syntax for Homebrew formulae (supporting the embedded diff)

samueljohn/decent 9

A decent color scheme for Sublime Text 2/3. Tailored for Python, CSS and Ruby. And regexp. highlighting.

samueljohn/homebrew 7

Forked to contribute to the missing package manager for OS X.

samueljohn/remarkable 6

Extendable Markdown.

awesomecodingskills/reconstruct_volume_from_RGB_slices 2

An algorithm to align and resample rgb images to create a 3D image volume stack

samueljohn/datasource 2

A python data source framework.

samueljohn/experiments 1

Run computer simulation experiments and configure them.

samueljohn/homebrew-dupes 1

System duplicate formulae for the Homebrew package manager

samueljohn/homebrew-julia 1

small repository to install julia

issue commentapple/coremltools

Arm64 wheel for coremltools==5.0b3 contains x86 .so files (at least for Python 3.9)

Thanks, Toby, I might switch to py38 for now.

Using the "hack" to add -arch arm64 to different flags, allows me to built a universal binary that works. I do not get a crash due to wrong architecture, however, I see a warning that my scikit-learn is too new, which puzzles me because I thought to read somewhere in the release notes that some scikit-learn newer than 0.19 was already supportet... (but that get's offtopic now)

(IRE) sam ~/Do…/coremltools-5.0b3 ❯ ipython                                                                                                 
Python 3.9.2 | packaged by conda-forge | (default, Feb 21 2021, 05:00:30) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.26.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import coremltools
WARNING:root:scikit-learn version 0.23.2 is not supported. Minimum required version: 0.17. Maximum required version: 0.19.2. Disabling scikit-learn conversion API.

samueljohn

comment created time in a month

issue commentapple/coremltools

Arm64 wheel for coremltools==5.0b3 contains x86 .so files (at least for Python 3.9)

Nope. setting CMAKE_OSX_ARCHITECTURES to arm64 does not overwrite the setting that these protobuf stuff always wants to build x86_64. I don't know where to set it properly.

However, when I really set (in advanced mode of ccmake . by pressing t) CMAKE_CXX_FLAGS, CMAKE_C_FLAGS, and CMAKE_SHARED_LINKER_FLAGS to -arch arm64, I can at least build a universal binary. That means somewhere in there is perhaps a hardcoded -arch x86_64?

samueljohn

comment created time in a month

issue commentapple/coremltools

Arm64 wheel for coremltools==5.0b3 contains x86 .so files (at least for Python 3.9)

nah, even when I build from source, in the ./build dir there are x86 files...

~/Do…/co…/build ❯ file libcoremlpython.dylib                                                                                      
libcoremlpython.dylib: Mach-O 64-bit dynamically linked shared library x86_64

I don't know why it is a .dylib and not a .so, though.

Now, I'll try to cd ./build %% ccmake . and then explicitly set the architecture ... maybe that helps?

samueljohn

comment created time in a month

issue commentapple/coremltools

Arm64 wheel for coremltools==5.0b3 contains x86 .so files (at least for Python 3.9)

Same thing if I pip install coremltools==5.0b3 (or with --pre). I will try to build from source ...

samueljohn

comment created time in a month

issue openedapple/coremltools

Arm64 wheel for coremltools==5.0b3 contains x86 .so files (at least for Python 3.9)

I downloaded the coremltools-5.0b3-cp39-none-macosx_11_0_arm64.whl for my M1 Mac.

However, import fails:

ImportError: dlopen(.../envs/IRE/lib/python3.9/site-packages/coremltools/libmodelpackage.so, 2): no suitable image found.  Did find:
	.../envs/IRE/lib/python3.9/site-packages/coremltools/libmodelpackage.so: mach-o, but wrong architecture
	.../envs/IRE/lib/python3.9/site-packages/coremltools/libmodelpackage.so: mach-o, but wrong architecture

(I replaced my path with ...)

And indeed unzipping the .whl file shows:

~ ❯ file ~/Downloads/coremltools-5.0b3-cp39-none-macosx_11_0_arm64.whl/coremltools/libcoremlpyt
hon.so                                                                                                   
/Users/sam/Downloads/coremltools-5.0b3-cp39-none-macosx_11_0_arm64.whl/coremltools/libcoremlpython.so: Mach-O 64-bit dynamically linked shared library x86_64
~ ❯ file ~/Downloads/coremltools-5.0b3-cp39-none-macosx_11_0_arm64.whl/coremltools/libmilstorag
epython.so                                                                                               
/Users/sam/Downloads/coremltools-5.0b3-cp39-none-macosx_11_0_arm64.whl/coremltools/libmilstoragepython.so: Mach-O 64-bit dynamically linked shared library x86_64
~ ❯ file ~/Downloads/coremltools-5.0b3-cp39-none-macosx_11_0_arm64.whl/coremltools/libmodelpack
age.so                                                                                                   
/Users/sam/Downloads/coremltools-5.0b3-cp39-none-macosx_11_0_arm64.whl/coremltools/libmodelpackage.so: Mach-O 64-bit dynamically linked shared library x86_64

I have set up my python stack with miniforge completely for M1 arm64.

created time in a month