Skip to content

Commit e0c8ce3

Browse files
committed
Remove '-mfpu=neon' GCC compiler option
The newer versions of TensorFlow use [`Eigen::half`](https://eigen.tuxfamily.org/dox-devel/Half_8h_source.html) to allow for 16-bit floating point operations. Unfortunately, these are not compatible with the NEON instruction set. To keep things simple (and functioning), the final `bazel build` step for creating the TensorFlow wheel no longer has `--copt="-mfpu=neon"` included.
1 parent f403978 commit e0c8ce3

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

GUIDE.md

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -270,20 +270,6 @@ cd tensorflow
270270

271271
_Note: if you're looking to build to a specific version or commit of TensorFlow (as opposed to the HEAD at master), you should `git checkout` it now._
272272

273-
---
274-
275-
#### NOTE: TensorFlow 0.9 compilation failing
276-
277-
As of June 10, 2016, there are issues with the build process for more recent commits in the TensorFlow repository. Most notably, the [0.9 release candidate 0](https://github.com/tensorflow/tensorflow/releases/tag/v0.9.0rc0) will not build. This is due to changes related to 16-bit floating point support. The most recent confirmed build was branch `r0.8`. If you'd like to build TensorFlow 0.8, run this command once inside of the TensorFlow directory:
278-
279-
```
280-
git checkout r0.8
281-
```
282-
283-
This notice will be removed once the problem is removed or a fix is found.
284-
285-
---
286-
287273
Once in the directory, we have to write a nifty one-liner that is incredibly important. The next line goes through all files and changes references of 64-bit program implementations (which we don't have access to) to 32-bit implementations. Neat!
288274

289275
```shell
@@ -307,7 +293,7 @@ _Note: if you want to build for Python 3, specify `/usr/bin/python3` for Python'
307293
Now we can use it to build TensorFlow! **Warning: This takes a really, really long time. Several hours.**
308294

309295
```shell
310-
bazel build -c opt --local_resources 1024,1.0,1.0 --verbose_failures --copt="-mfpu=neon" tensorflow/tools/pip_package:build_pip_package
296+
bazel build -c opt --local_resources 1024,1.0,1.0 --verbose_failures tensorflow/tools/pip_package:build_pip_package
311297
```
312298

313299
_Note: I toyed around with telling Bazel to use all four cores in the Raspberry Pi, but that seemed to make compiling more prone to completely locking up. This process takes a long time regardless, so I'm sticking with the more reliable options here. If you want to be bold, try using `--local_resources 1024,2.0,1.0` or `--local_resources 1024,4.0,1.0`_

0 commit comments

Comments
 (0)