在带有m1芯片的mac上导入jax失败

ujv3wf0j  于 2021-08-20  发布在  Java
关注(0)|答案(1)|浏览(1304)

对于Python3.8.8,在jupyter笔记本和python终端中使用新的mac air(带有m1芯片), import jax 引发此错误

Python 3.8.8 (default, Apr 13 2021, 12:59:45)
[Clang 10.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import jax
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/steve/Documents/code/jax/jax/__init__.py", line 37, in <module>
    from . import config as _config_module
  File "/Users/steve/Documents/code/jax/jax/config.py", line 18, in <module>
    from jax._src.config import config
  File "/Users/steve/Documents/code/jax/jax/_src/config.py", line 26, in <module>
    from jax import lib
  File "/Users/steve/Documents/code/jax/jax/lib/__init__.py", line 63, in <module>
    cpu_feature_guard.check_cpu_features()
RuntimeError: This version of jaxlib was built using AVX instructions, which your CPU and/or operating system do not support. You may be able work around this issue by building jaxlib from source.

我怀疑这是因为m1芯片。
我试着用jax和 pip install jax ,然后我按照注解中的建议从源代码构建了它,方法是克隆它们的存储库并遵循此处给出的说明,但显示的是相同的错误消息。

00jrzges

00jrzges1#

jax尚未提供与m1芯片兼容的预构建jaxlib控制盘。我所知道的在m1上构建jaxlib的最佳信息来源可能是github问题:https://github.com/google/jax/issues/5501,它还跟踪改进此支持。
希望m1的支持能在不久的将来得到改善,但科学计算基础设施需要一段时间才能跟上新芯片的要求。

相关问题