I thought I would start a topic to consolidate some questions and info regarding image analysis on this consumer arm64 platform: Apple Silicon (arm64) with MacOS 11.4 (Big Sur). I think this platform is here to stay—disclosure, I own an M1 MBPro.
I want to focus on native arm64 only, as this offers greater performance.
I (and at least a couple others) have been able to run Fiji/ImageJ native by installing a “no JRE” version combined with a native JRE. See:
Native JRE is available via homebrew (openJDK Java11, Java16):
or from Azul (Zulu Java8, 11, 13, 15, 16):
As I posted on Twitter, switching to native results in ~40% performance increase in a simple CPU benchmark from @haesleinhuepf
However, switching to native JRE results in issues: you can’t mix architectures. So for example, my initial trials with CLIJ only worked in Rosetta, the emulation environment—when everything is emulated, everything works.
To fully leverage things—particularly in CLIJ, but probably other high performance analysis pipelines—one needs native components. For CLIJ this required compiling a native JOCL library (Java Bindings for OpenCL). I was able to do this—it was actually trivial—and @haesleinhuepf has added it to his CLIJ distribution and it works: ~8X speedup.
So my question to those more knowledgable and those writing plugins: what other libraries are like JOCL, that they need to be recompiled?
Again, I’ve managed to compile the library, but a bit more help is needed I think, plus ultimately distribution.
Another one is StarDist, which uses Tensorflow-Java:
This one is definitely trickier!
There is an Apple Tensorflow fork with arm64 support, but getting from there to TF-Java is still not obvious.
What other plugins, libraries need recompiling? I’m willing to help/test, but my coding experience is really limited, mostly to copy-pasta. I can follow directions—when I read them—and have the basic toolchains installed (gcc, llvm, cmake, etc.).