【折腾】Jittor在ARM Mac下的安装

前置要求,homebrew

按GitHub的quickstart

brew install onednn libomp

注意这里没必要装python3.7了,这玩意也不支持arm

brew install python@3.8

然后试了一下,出错了,原因是之前换的源

根本没必要折腾换源,正确上网以后brew飞快

brew doctor

把warning里的提示复制出来跑

折腾了半天,还是不行,提示找不到python3.8-config,看了一下issue,好像是conda的问题

退回去base,又提示没有numpy

conda install numpy

然后再次安装

python3 -m pip install jittor

终于可以了

-m jittor.test.test_example

`bash
[i 0429 00:30:24.156270 00 compiler.py:951] Jittor(1.3.3.14) src: /Users/caiziqi/mambaforge/lib/python3.9/site-packages/jittor
[i 0429 00:30:24.180594 00 compiler.py:952] g++ at /usr/bin/g++(13.1.6)
[i 0429 00:30:24.180656 00 compiler.py:953] cache_path: /Users/caiziqi/.cache/jittor/jt1.3.3/g++13.1.6/py3.9.10/macOS-12.3.1-axa5/AppleM1Pro/default
[i 0429 00:30:24.322291 00 init.py:227] Total mem: 16.00GB, using 5 procs for compiling.

Compiling jittor_core(147/147) used: 22.011s eta: 0.000s
[i 0429 00:30:46.837270 00 jit_compiler.cc:28] Load cc_path: /usr/bin/g++
[i 0429 00:30:52.698847 00 compile_extern.py:516] mpicc not found, distribution disabled.

[i 0429 00:30:52.701137 00 compiler.py:34] Create cache dir: /Users/caiziqi/.cache/jittor/jt1.3.3/g++13.1.6/py3.9.10/macOS-12.3.1-axa5/AppleM1Pro/default/custom_ops

Compiling Operators(3/3) used: 2.34s eta: 0s

Compiling Operators(4/4) used: 3.38s eta: 0s
step 0, loss = 0.9048624038696289 {‘hold_vars’: 13, ‘lived_vars’: 62, ‘lived_ops’: 56}

Compiling Operators(9/9) used: 4.37s eta: 0s
step 1, loss = 0.41014260053634644 {‘hold_vars’: 13, ‘lived_vars’: 62, ‘lived_ops’: 56}
step 2, loss = 0.39250561594963074 {‘hold_vars’: 13, ‘lived_vars’: 62, ‘lived_ops’: 56}

Original: https://www.cnblogs.com/ghostcai/p/16205160.html
Author: GhostCai
Title: 【折腾】Jittor在ARM Mac下的安装

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/567867/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球