Skip to main content

Arbitrary precision integers in TensorFlow.

Project description

TF Big

TF Big provides some basic operations for big integers. TF Big uses libgmp for its optimized big integer routines.

Developer Requirements

Ubuntu

The only requirement for Ubuntu is to have docker installed. This is the recommended way to build custom operations for tensorflow. Please see the documentation here. We provide a custom development container for TF Big which contains the libgmp dependency already installed.

The documentation for installing docker on Ubuntu can be found here.

MacOS

TODO simplify this, add a bootstrap script to Makefile

Since we can't use a MacOS docker container, setting up a development environment is a little more involved. We need four things:

  • Python 3.5 or 3.6
  • Homebrew
  • Bazel 0.15.0
  • libgmp
  • Tensorflow 1.13.1 TODO support 1.14, might be a little involved

We recommend using Anaconda to set up a Python 3.5 or 3.6 environment. Once Anaconda is installed this can be done with:

$ conda create -n py36 python=3.6
$ source activate py36

We recommed using Homebrew to install the next couple of dependencies. This can be installed easily with:

$ /usr/bin/ruby -e "$(curl -fsSL \
    https://raw.githubusercontent.com/Homebrew/install/master/install)"

Bazel recommends installing with their binary installed. The documentation for this can be found here. But if you have Homebrew already installed you can install bazel with a couple of simple commands:

$ brew tap bazelbuild/tap
$ brew install bazelbuild/tap/bazel

Next, we can install libgmp with Homebrew:

brew install gmp

Tensorflow will be installed automatically when using the Makefile so no need to install it manually but it can be done before hand by using pip:

pip install tensorflow==1.13.1

Building

Tests

Ubuntu

Run the tests on Ubuntu by running the make test command inside of a docker container. Right now, the docker container doesn't exist on docker hub yet so we must first build it:

docker build -t tf-encrypted/tf-big:0.1.0 .

Then we can run make test:

sudo docker run -it -v `pwd`:/opt/my-project \
  -w /opt/my-project \
  tf-encrypted/tf-big:0.1.0 /bin/bash -c "make test"

MacOS

Once the environment is set up we can simply run:

make test

This will install Tensorflow if not previously installed and build and run the tests.

Pip Package

TODO

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

tf_big-0.1.1-cp36-cp36m-macosx_10_7_x86_64.whl (840.3 kB view hashes)

Uploaded CPython 3.6m macOS 10.7+ x86-64

tf_big-0.1.0-cp37-cp37m-macosx_10_7_x86_64.whl (270.2 kB view hashes)

Uploaded CPython 3.7m macOS 10.7+ x86-64

tf_big-0.1.0-cp36-cp36m-manylinux1_x86_64.whl (315.8 kB view hashes)

Uploaded CPython 3.6m

tf_big-0.1.0-cp36-cp36m-macosx_10_7_x86_64.whl (270.8 kB view hashes)

Uploaded CPython 3.6m macOS 10.7+ x86-64

tf_big-0.1.0-cp35-cp35m-manylinux1_x86_64.whl (315.8 kB view hashes)

Uploaded CPython 3.5m

tf_big-0.1.0-cp35-cp35m-macosx_10_6_x86_64.whl (270.2 kB view hashes)

Uploaded CPython 3.5m macOS 10.6+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page