547 Commits

Author SHA1 Message Date
Peter Hawkins
913d7562a8
Add scipy as a dependency of jaxlib.
Jaxlib depends on LAPACK kernels provided by Scipy.
2019-01-16 14:33:45 -05:00
Peter Hawkins
27eb26c8db Add script to build Jaxlib wheels for multiple Python versions on Mac OS X. 2019-01-16 14:08:21 -05:00
Peter Hawkins
0316d31479 Rename build/BUILD to build/BUILD.bazel.
Avoids name conflict when building wheels on case-insensitive filesystems as on Mac OS X.
2019-01-13 09:38:10 -05:00
Matthew Johnson
aaf0e3cfaf bump jaxlib version for new wheels 2019-01-12 07:19:04 -08:00
Peter Hawkins
5031016465 Disable a number of TF features in build.py that we don't use and don't need to build. 2019-01-07 10:59:08 -05:00
Matthew Johnson
f277609708 add scipy and cython to wheel dockerfile 2018-12-18 19:09:15 -08:00
Matthew Johnson
6757b758a2 bump jaxlib version for wheel building 2018-12-18 19:04:01 -08:00
Peter Hawkins
e630fda9ee Add missing copyright notice.
Remove unused BUILD load() statement.
2018-12-17 16:30:27 -05:00
Peter Hawkins
3c388b98f1 Add support for calling LAPACK primitives from SciPy from JAX linalg. 2018-12-17 16:30:27 -05:00
Peter Hawkins
3d4cb9f955 Enable MKL-DNN contraction kernels.
Add a new build option --enable_mkl_dnn that enables MKLDNN contraction kernels in XLA. This leads to significant performance improvements for XLA's dot operator. Enable MKL-DNN by default.

Update XLA version to include MKL-DNN build fix.

Also add a new --enable_march_native build option that turns on -march=native. This is unlikely to have a significant performance impact since XLA JIT-compiles most of its code. Leaving this off by default because it also generates code unlikely to run across a wide selection of architectures and so is unsuitable for building pip wheels.
2018-12-14 12:21:25 -05:00
Matthew Johnson
97d747cd08 bump jaxlib version for pypi reasons 2018-12-13 18:37:31 -08:00
Matthew Johnson
b986513e97 bump jaxlib version to 0.1.1 2018-12-13 17:35:36 -08:00
Peter Hawkins
cad36945a2 Update build.py to write its .bazelrc in the root directory of the repository, next to the workspace.
Fixes build breakage caused by workspace move.
2018-12-12 15:55:55 -05:00
Peter Hawkins
11720fd0aa Consolidate build/WORKSPACE and WORKSPACE. We don't need to have two WORKSPACEs in the same project; if we later choose to split C++ and Python parts of the project into separate repositories, we can split the WORKSPACE at that time. 2018-12-12 09:16:03 -05:00
Peter Hawkins
c1a42617a3 Update XLA to include Python linear algebra changes. 2018-12-12 09:05:16 -05:00
1e100
314056edb6 Make Jax buildable with the latest Bazel
Without this change build script fails with the following message: 
```
Encountered error while reading extension file 'tensorflow/workspace.bzl': no such package '@org_tensorflow//tensorflow': The native http_archive rule is deprecated. load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") for a drop-in replacement.
```

This PR simply implements the suggestion in the error. I was able to successfully build after applying the change.
2018-12-12 08:46:19 -05:00
Peter Hawkins
f4212d47e5
Merge pull request #46 from hawkinsp/master
Update XLA and reenable numpy tests that failed on Mac
2018-12-10 13:28:56 -05:00
Peter Hawkins
c0e24f18b8 Update XLA to include Mac OS X fixes from
c072977590
2018-12-10 13:27:08 -05:00
Peter Hawkins
5510ceaf55 Set --distinct_host_configuration=false in the bazel options.
This makes initial builds cheaper (since we don't need to build some files in separate host and target configurations) but may make switching between build configurations more expensive (since we can share less work). The build script should optimize for the former.
2018-12-10 09:18:49 -05:00
Colin
2bbc046d9d Require protobuf 3.6.0 or later 2018-12-09 10:11:21 -08:00
Matthew Johnson
b907bcd5ae improve jaxlib wheel building script 2018-12-09 08:59:08 -08:00
Dougal Maclaurin
2e24f91a48 Added license header 2018-12-07 12:06:18 -05:00
Matthew Johnson
a9640b3ebb tweak wheel names in build script 2018-12-07 08:26:34 -08:00
Matthew Johnson
7093c4740f revive WORKSPACE file 2018-12-07 08:19:30 -08:00
Matthew Johnson
bd8bef6849 Merge remote-tracking branch 'origin/master' 2018-12-07 08:15:40 -08:00
Matthew Johnson
8a90d37da2 update wheel building dockerfile 2018-12-07 08:15:13 -08:00
Matthew Johnson
762abcf29b update wheel builder docker entrypoint script 2018-12-07 08:14:24 -08:00
Dougal Maclaurin
d89c7c2457 Merge branch 'master' into quickish-check 2018-12-07 11:13:41 -05:00
Matthew Johnson
91f8247d32 update wheel name 2018-12-07 08:12:33 -08:00
Matthew Johnson
18201fab7b bump version number for jaxlib 2018-12-07 08:09:51 -08:00
Matthew Johnson
f6d31ad5f1 update dockerfile entrypoint script git hash 2018-12-07 07:35:32 -08:00
Matthew Johnson
9fd120113d add jaxlib wheel building script 2018-12-07 07:34:47 -08:00
Matthew Johnson
d4f32dff7b update build script for split packages 2018-12-07 07:34:37 -08:00
Matthew Johnson
e93f682d58 check out build files 2018-12-07 07:33:50 -08:00
Matthew Johnson
bbc92ce6eb
Split out jax and jaxlib packages (#11)
factor out 'jaxlib' as separate package
2018-12-06 21:35:03 -05:00
Peter Hawkins
599ea38175 [JAX] Explicitly use /bin/bash in install_xla_in_source_tree.sh.
It turns out the script uses some bash-isms not supported by the /bin/sh (dash) shell on a Debian machine.

PiperOrigin-RevId: 222884583
2018-11-27 16:51:19 -08:00
Peter Hawkins
f3513a7bfb [JAX] Rewrite OSS build script.
Significant changes:
* Mac OS X support.
* build script is in Python, not shell.
* build configuration is passed via flags, not environment variables.
* build script configures TF itself, and does not require explicitly checking out the TF git repository and running its configure script. Changes the TF dependency in the Bazel workspace to be an http_archive(), rather than a local checkout of TF.
* rather than trying to guess the path for Bazel-generated XLA artifacts, use a sh_binary() to perform installation of the built artifacts in to the JAX source tree. Bazel's runfiles mechanism is the supported route to find build artifacts.
* downloads Bazel in Python and checks its SHA256 before running it, rather than running an untrusted binary from the internet.
* intentionally does not delete the Bazel cache or Bazel after building.

Example of new build interaction:

Building without CUDA on Mac or Linux:
$ cd jax
$ python3 build.py   (or python2 build.py if you want a Python 2 build)

     _   _    __  __
    | | / \   \ \/ /
 _  | |/ _ \   \  /
| |_| / ___ \  /  \
 \___/_/   \_\/_/\_\

Starting local Bazel server and connecting to it...
Bazel binary path: /Users/xyz/bin/bazel
Python binary path: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3
CUDA enabled: no

Building XLA and installing it in the JAX source tree...
...

Example of building with CUDA enabled on Linux:
$ python3 build.py --enable_cuda --cudnn_path=/usr/lib/x86_64-linux-gnu/
... as before, except ...
CUDA enabled: yes
CUDA toolkit path: /usr/local/cuda
CUDNN library path: /usr/lib/x86_64-linux-gnu/
...

PiperOrigin-RevId: 222868835
2018-11-27 16:51:17 -08:00
Matthew Johnson
dbf3c606f5 source sync
PiperOrigin-RevId: 222500675
2018-11-27 16:51:00 -08:00
Roy Frostig
a954389d06 source sync
PiperOrigin-RevId: 222189611
2018-11-21 20:22:37 -08:00
Roy Frostig
a3619ca89d source sync
PiperOrigin-RevId: 222153576
2018-11-21 20:22:30 -08:00
Matthew Johnson
50038c07c8 fix build file issues 2018-11-19 20:18:31 -08:00
Matthew Johnson
af62fdc17d update build script: bazel-0.19.2 and darwin 2018-11-19 08:46:25 -08:00
Matthew Johnson
7773167995 add CPU-only build option 2018-11-19 08:30:37 -08:00
Matthew Johnson
d347d65c5c add dummy binary build target, move WORKSPACE up 2018-11-18 15:54:13 -08:00
Matthew Johnson
c03e5e80c5 tweak build script 2018-11-18 15:44:20 -08:00
Matthew Johnson
fd8d83dca2 tweak build file 2018-11-18 14:58:01 -08:00
Matthew Johnson
f78c05195d add gpu build script 2018-11-18 14:24:09 -08:00