Skip to content

Instantly share code, notes, and snippets.

View wangjia184's full-sized avatar

Jerry.Wang wangjia184

View GitHub Profile
@wangjia184
wangjia184 / tensorflow_cpu_m1_darwin_arm64_rust.md
Created August 17, 2022 02:27 — forked from lnshi/tensorflow_cpu_m1_darwin_arm64_rust.md
Build TensorFlow C library on Apple M1 (darwin_arm64) and use it with TensorFlow rust bindings

Background

Currently if you try to use the TensorFlow rust bindings crate: tensorflow = "0.17.0", this crate's sub-crate: tensorflow-sys will try to build the underlying TensorFlow C library from the source as Google hasn't provided an official release for Apple M1, but unfortunately the building will fail.

This gist provides a full working instructions for you to build the TensorFlow C library on Apple M1 (darwin_arm64), and eventually use it with the TensorFlow rust bindings crate: tensorflow = "0.17.0".

This gist was tested on TensorFlow v2.8.0, the other versions should work in the same way.

Steps