问题
Is new macbook m1 suitable for Data Science?
Do Data Science python libraries such as pandas, numpy, sklearn etc work on the macbook m1 (Apple Silicon) chip and how fast compared to the previous generation intel based macbooks?
回答1:
This GitHub repository has lots of useful information about the Apple M1 chip and data science in Python https://github.com/neurolabusc/AppleSiliconForNeuroimaging. I have included representative quotes below.
TL;DR
Unless you are a developer, I would strongly discourage scientists from purchasing an Apple Silicon computer in the short term. Productive work will require core tools to be ported. In the longer term, this architecture could have a profound impact on science. In particular if Apple develops servers that exploit the remarkable power efficiency of their CPUs (competing with AWS Graviton) and leverage the Metal language and GPUs for compute tasks (competing with NVidia's Tesla products and CUDA language).
Limitations facing Apple Silicon
The infrastructure scientists depend on is not yet available for this architecture. Here are some of the short term limitations:
- Scientists using the popular R, Julia and Python languages require an open source Fortran compiler. While Python is available on Apple Silicon, tools like Numpy and Scipy require Fortran compilation. One solution is to install a Python distribution like miniconda and run its pip installer to add Intel packages (the scripts included in this repository require numpy, pandas, and seaborn). There is a delay when one first imports one of these libraries while they are translated. Subsequently, the translated Python libraries appear to run well.
- While Apple's C Clang compiler generates fast native code, many scientific tools will need to wait until gcc, golang and gFortran compilers are available.
- Tools like VirtualBox, VMware Fusion, Boot Camp and Parallels do not yet support Apple Silicon. Many users rely on these tools for using Windows and Linux programs on their macOS computers.
- Docker does not support Apple Silicon. These containers are popular with many neuroimaging tools.
- Many homebrew components do not support Apple Silicon. Users will have to install translated components or build supported modules from source.
- MATLAB is used by many scientific tools, including SPM. While Matlab works in translation, it is not yet available natively (and mex files will need to be recompiled).
- FSL and AFNI do not yet natively support this architecture. While code may work in translation, creating some native tools must wait for compilers and libraries to be updated. This will likely require months.
- The current generation M1 only has four high performance cores. Most neuroimaging pipelines combine sequential tasks that only require a single core (where the M1 excels) as well as parallel tasks. Those parallel tasks could exploit a CPU with more cores (as shown in the pigz and niimath tests below). Bear in mind that this mixture of serial and parallel code faces Amdahls law, with diminishing returns for extra cores.
- The current generation M1 has a maximum of 16 Gb of RAM. Neuroimaging datasets often have large memory demands (especially multi-band accelerated functional, resting-state and diffusion datasets).
来源:https://stackoverflow.com/questions/65095614/macbook-m1-and-python-libraries