Support for new Apple M1 "System-on-Chip" Processors

stream41

New member
Mar 11, 2020
2
0
Any news or updates on this? Really looking forward to an M1 (M1X? M2?) iMac later this year, but I use StarNet quite often in my processing routines, so it would be a real drag to lose it.
 

Juan Conejero

PixInsight Staff
Sep 2, 2004
7,895
226
57
Valencia, Spain
pixinsight.com
The current situation is as follows:

- Our main codebase, including the entire PCL development framework and all PixInsight modules, is standard C++17 with just a few exceptions. This means that it can be ported to run on ARM processors quite easily.

- The PixInsight core application depends on the Qt framework. Currently we are using the latest Qt 5.15.3 LTS for the incoming version 1.8.8-8 of PixInsight, but Qt 5 does not support Apple Silicon processors. Full support of these processors on macOS will only be available in Qt 6. However, the current versions 6.0.x of Qt are just proofs of concept, completely useless for a large and complex application like PixInsight. Stable and complete support of Apple Silicon for all Qt modules (including QtWebEngine, which is a port of the Chromium browser) is supposed to arrive with Qt 6.2 by the end of this year. However, based on my experience of more than 15 years doing Qt-based development, I don't expect this to happen before Qt 6.5, to be realistic. This means from 1 to 1.5 years.

- Our JavaScript development platform (PJSR) uses Mozilla's SpiderMonkey engine. The SM version 24 that we are using in current versions of PixInsight is now obsolete and does not support ARM processors with the appropriate level of optimization. I am starting to port the entire PJSR to a current version of SpiderMonkey, but the amount of work required to complete this task is huge. It requires a complete rewrite of hundreds of thousands of lines of complex and extremely delicate source code. I need a lot of time to complete this task, especially considering that we have many other ongoing projects and priority tasks.

- PixInsight depends on many other open-source and proprietary libraries, including file format support libraries such as CFITSIO, LibTiff, LibRaw, etc, and several utility, numerical and hardware control libraries. All of these components must also be ported to run on Apple Silicon processors in a completely stable way. This ranges from very simple cases to quite complex ones, which will also require a lot of work.

To summarize: being realistic, don't expect a native Apple Silicon version of PixInsight to be released before one year, and probably more time, depending on how other third-party components evolve, especially Qt.

I use StarNet quite often in my processing routines
Then you have a strong dependency on a process that performs an extremely specialized task. This is not a good thing IMO. Image processing is much richer and more interesting than removing stars.
 

Marcelofig

Member
Dec 30, 2017
15
1
So far I'm quite satisfied with PI's performance under Rosetta2 (Mac mini M1/16GB), it's almost twice as fast than my old 2015 intel iMac.

Of course it would be great to have a native version soon or to have the Starnet module modified to run on ARM processors. But for now it works fine.
 

stream41

New member
Mar 11, 2020
2
0
Then you have a strong dependency on a process that performs an extremely specialized task. This is not a good thing IMO. Image processing is much richer and more interesting than removing stars.
I was more concerned about the many script utilities I use (EZ Processing Suite, etc) that seem to rely on StarNet.

I appreciate the update, and your hard work is always appreciated. I used to do very basic coding a lifetime ago in high school and college, so I understand (on a broad brush strokes level) the amount of work something like this entails.

I think Marcelofig might be on to something. If Rosetta2 runs PI quite well on M1 processors (and I've seen more than enough reports to believe that it does) other than StarNet, might just the StarNet module be ported/modified as a stop-gap measure until all of PI with its dependencies are ported over? That would "kick the can down the road" quite a long distance, and provide a far more casual schedule for you to finish the overall process.
 

pfile

PTeam Member
Nov 23, 2009
6,381
217
might just the StarNet module be ported/modified as a stop-gap measure until all of PI with its dependencies are ported over? That would "kick the can down the road" quite a long distance, and provide a far more casual schedule for you to finish the overall process.
starnet itself is OK, but it has a huge external dependence on tensorflow. and i'm not sure google has released an ARM binary for this either.

i was looking at this yesterday - to see what it would take to recompile tensorflow w/o AVX2/FMA instructions. it looks like a lot of work and is pretty opaque since google relies on specialized tools as part of the compile flow for tensorflow. it's not even clear to me that dylibs are an end product of their published flow. also there is a depenence on python and python is a serious world of hurt when it comes to getting the exact version of python that they expect you to have installed.

rob
 

xonefs

New member
Dec 23, 2020
1
0
I probably should have read this before buying an m1 macbook air the other day

I dont use starnet that much but a lot of stuff like ezprocessing suite I do use relies in starnet to generate starmasks. this will be problematic.

This little air seems very good otherwise and for $1600 is a good deal. I can still return it and maybe get a 16" intel MPB but that's a lot more $$ to get specd how I want and maybe not even faster.
 

pfile

PTeam Member
Nov 23, 2009
6,381
217
i havent looked into rosetta2 at all... for the M1 tensorflow to work with the x86 version of PI, rosetta2 would have to support loading and calling ARM dynamic libraries from a translated x86-64 binary, and i don't know if this would work. in theory it should work since lots of dylibs that are part of the OS are ARM and they can be called fine from x86-64 binaries. but we'd have to see. i only have access to one M1 mac and it is pretty heavily used by my daughter so i don't get many chances to experiment with it.