2023 16-inch MacBook Pro with M2 Max, Ventura 13.4 (22F66)
I tried following the steps from https://developer.apple.com/metal/jax/ but getting errors at the "build jaxlib from source, with capability to load plugin" stage.
ERROR: /private/var/tmp/_bazel_username/5e1a987b267efa1dbff3dfa54a7e8e5c/external/llvm-project/llvm/BUILD.bazel:769:11: Generating code from table: include/llvm/IR/Intrinsics.td @llvm-project//llvm:intrinsic_AArch64_gen__gen_intrinsic_enums__intrinsic_prefix_aarch64_genrule failed: (Illegal instruction): bash failed: error executing command
(cd /private/var/tmp/_bazel_username/5e1a987b267efa1dbff3dfa54a7e8e5c/execroot/main &&
exec env -
PATH=/Users/username/jax-metal/bin:/Users/username/opt/anaconda3/bin:/Users/username/opt/anaconda3/condabin:/Library/Frameworks/Python.framework/Versions/3.11/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
/bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; bazel-out/darwin-opt/bin/external/llvm-project/llvm/llvm-min-tblgen -I external/llvm-project/llvm/include -I external/llvm-project/clang/include -I $(dirname external/llvm-project/llvm/include/llvm/IR/Intrinsics.td) -gen-intrinsic-enums -intrinsic-prefix=aarch64 external/llvm-project/llvm/include/llvm/IR/Intrinsics.td -o bazel-out/darwin-opt/bin/external/llvm-project/llvm/include/llvm/IR/IntrinsicsAArch64.h')
ERROR: /private/var/tmp/_bazel_username/5e1a987b267efa1dbff3dfa54a7e8e5c/external/llvm-project/llvm/BUILD.bazel:685:7: Generating code from table: include/llvm/CodeGen/ValueTypes.td @llvm-project//llvm:vt_gen__gen_vt_genrule failed: (Illegal instruction): bash failed: error executing command
(cd /private/var/tmp/_bazel_username/5e1a987b267efa1dbff3dfa54a7e8e5c/execroot/main &&
exec env -
PATH=/Users/username/jax-metal/bin:/Users/username/opt/anaconda3/bin:/Users/username/opt/anaconda3/condabin:/Library/Frameworks/Python.framework/Versions/3.11/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
/bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; bazel-out/darwin-opt/bin/external/llvm-project/llvm/llvm-min-tblgen -I external/llvm-project/llvm/include -I external/llvm-project/clang/include -I $(dirname external/llvm-project/llvm/include/llvm/CodeGen/ValueTypes.td) -gen-vt external/llvm-project/llvm/include/llvm/CodeGen/ValueTypes.td -o bazel-out/darwin-opt-exec-50AE0418/bin/external/llvm-project/llvm/include/llvm/CodeGen/GenVT.inc')
and more lke that.
Is there any way to fix this?
Thanks