All Projects → Thunderbottom → Tensorflow-binaries

Thunderbottom / Tensorflow-binaries

Licence: other
Tensorflow GNU/Linux, MacOS binaries compiled with SSE4.1, SSE4.2 and AVX

Projects that are alternatives of or similar to Tensorflow-binaries

real-world-bazel
Bazel build files collected from real-world GitHub projects
Stars: ✭ 24 (+71.43%)
Mutual labels:  build, bazel
Bazel
a fast, scalable, multi-language and extensible build system
Stars: ✭ 17,790 (+126971.43%)
Mutual labels:  build, bazel
bzl
Bzl - Integrated CLI + UI + VSCode Extension for Bazel
Stars: ✭ 43 (+207.14%)
Mutual labels:  build, bazel
trampolim
A modern Python build backend
Stars: ✭ 39 (+178.57%)
Mutual labels:  build, wheel
Tutorial Ubuntu 18.04 Install Nvidia Driver And Cuda And Cudnn And Build Tensorflow For Gpu
Ubuntu 18.04 How to install Nvidia driver + CUDA + CUDNN + build tensorflow for gpu step by step command line
Stars: ✭ 91 (+550%)
Mutual labels:  build, bazel
airin
A framework for automated migration of your projects to Bazel build system.
Stars: ✭ 21 (+50%)
Mutual labels:  build, bazel
Bazel Remote
A remote cache for Bazel
Stars: ✭ 260 (+1757.14%)
Mutual labels:  build, bazel
whey
A simple Python wheel builder for simple projects.
Stars: ✭ 17 (+21.43%)
Mutual labels:  build, wheel
Awesome Bazel
A curated list of Bazel rules, tooling and resources.
Stars: ✭ 640 (+4471.43%)
Mutual labels:  build, bazel
Angular Bazel Example
MOVED to the bazel nodejs monorepo 👉
Stars: ✭ 354 (+2428.57%)
Mutual labels:  build, bazel
cresset
Template repository to build PyTorch projects from source on any version of PyTorch/CUDA/cuDNN.
Stars: ✭ 573 (+3992.86%)
Mutual labels:  build, wheel
Buildbuddy
BuildBuddy is an open source Bazel build event viewer, result store, and remote cache.
Stars: ✭ 182 (+1200%)
Mutual labels:  build, bazel
Tensorflow Windows Wheel
Tensorflow prebuilt binary for Windows
Stars: ✭ 3,428 (+24385.71%)
Mutual labels:  build, wheel
Please
High-performance extensible build system for reproducible multi-language builds.
Stars: ✭ 1,856 (+13157.14%)
Mutual labels:  build, bazel
Bazel Watcher
Tools for building Bazel targets when source files change.
Stars: ✭ 245 (+1650%)
Mutual labels:  build, bazel
bazel-action
A GitHub action to run @bazelbuild commands
Stars: ✭ 18 (+28.57%)
Mutual labels:  bazel
bazel clang tidy
Run clang-tidy on Bazel C++ targets directly, efficiently, with caching enabled
Stars: ✭ 63 (+350%)
Mutual labels:  bazel
docker-buildbox
Docker images for GitLab CI's jobs
Stars: ✭ 54 (+285.71%)
Mutual labels:  build
Bazel bin
Bazel's pre-built binaries for armv7l / aarch64 / x86_64.
Stars: ✭ 23 (+64.29%)
Mutual labels:  bazel
rules ocaml
OCaml build rules for Bazel
Stars: ✭ 38 (+171.43%)
Mutual labels:  bazel

Tensorflow macOS binary

Tensorflow macOS binary, compiled with SSE4.1, SSE4.2 and AVX optimizations.

If you want to compile your own binary for macOS, check out compiling your own binary

Versioning

Latest available tensorflow version: tensorflow version

Getting Started

These instructions will get you a copy of the tensorflow running with SSE4.1, SSE4.2 and AVX enabled for optimizations.

Please DO NOT install the following binary if your CPU does not support the above optimizations.

How do I check for compatibility?

You should get the following warnings while running tensorflow which was downloaded through pip:

The TensorFlow library wasn't compiled to use SSE4.1/SSE4.2/AVX instructions, 
but these are available on your machine and could speed up CPU computations.

If this is not something that you see while executing tensorflow programs, please do not install this binary.

Installing

Download the binary from the git repository

git clone https://github.com/Thunderbottom/Tensorflow-macOS-binary.git

Open up your existing virtualenv:

source /path/to/virtualenv/bin/activate

Or create a new one:

# Make sure you have virtualenv installed
# or install it: pip install virtualenv (Use pip3 if pip is python2)
cd /path/to/whatever && virtualenv whatever

Install the downloaded wheel file with pip

# Use pip3 for python3
pip install filename.whl
# If you have an existing tensorflow installation, it'll be automatically removed and replaced.

Post installation

We need to check if tensorflow was properly installed. To check that, run the following command:

python3 -c 'import tensorflow as tf; print(tf.__version__)'

The output should look somewhat like this:

1.3.0

Built With

Compiling your own binary

To compile your own version of tensorflow binary, you'll need the following:

python

brew install python python3

pip

# pip will probably be installed along with python
# if pip is not installed, you may go to
https://pip.pypa.io/en/stable/installing/

numpy1.12.1

pip install numpy

wheel

pip install wheel

bazel -

https://bazel.build/versions/master/docs/install-os-x.html

xcode commandlinetools -

# Run the following command in terminal
xcode-select install

Create a virtualenv -

# Make sure you have virtualenv installed
# or install it: pip install virtualenv (Use pip3 if pip is python2)
cd /path/to/whatever && virtualenv whatever

Open the virtualenv -

source /path/to/whatever/bin/activate

Clone the tensorflow repository -

# Replace <latest-version> with latest revision branch from repo
git clone https://github.com/tensorflow/tensorflow && cd tensorflow && git checkout <latest-version>

Run the configuration file and configure according to your needs -

./configure

After the configuration is complete, we will compile the binary -

# the following command will enable SSE4.1, SSE4.2 and AVX
bazel build -c opt --copt=-mavx --copt=-msse4.1 --copt=-msse4.2  -k //tensorflow/tools/pip_package:build_pip_package

If you wish to tune the flags, or add more compilation flags, you may do so by adding the following flags before the -k flag :

CUDA - --config=cuda

AVX2 - --copt=-mavx2

FMA - --copt=-mfma --copt=-mfpmath=both

After the compilation is complete, we will generate the wheel file -

bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg

Now, the wheel file will be generated and stored at /tmp/tensorflow_pkg

To install :

# Use pip3 for python3
pip install /tmp/tensorflow_pkg/filename.whl

Check out post-installation instructions to check the installed binary

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].