Skip to content

Instantly share code, notes, and snippets.

View wangjia184's full-sized avatar

Jerry.Wang wangjia184

View GitHub Profile
#Prerequisite
* Tensorflow Version : 2.10. Pull source code from `https://github.com/tensorflow/tensorflow/tree/r2.10`. `r2.10` is preferred branch.
* Python 3.10
* `pip3 install numpy`
* CMake
Official instructions can be found at : https://www.tensorflow.org/lite/guide/build_cmake#build_tensorflow_lite_c_library
@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

@wangjia184
wangjia184 / build.log
Last active October 26, 2019 09:54
cross +beta build --target x86_64-pc-windows-gnu --release -vv
Fresh cfg-if v0.1.10
Fresh winapi v0.2.8
Fresh semver-parser v0.7.0
Fresh cc v1.0.45
Fresh futures v0.1.29
Fresh unicode-xid v0.2.0
Fresh autocfg v0.1.6
Fresh slab v0.4.2
Fresh smallvec v0.6.10
Fresh scopeguard v1.0.0