rocm_jax/build/WORKSPACE

37 lines
1.3 KiB
Python
Raw Normal View History

2018-11-17 18:03:33 -08:00
http_archive(
name = "io_bazel_rules_closure",
sha256 = "a38539c5b5c358548e75b44141b4ab637bba7c4dc02b46b1f62a96d6433f56ae",
strip_prefix = "rules_closure-dbb96841cc0a5fb2664c37822803b06dab20c7d1",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_closure/archive/dbb96841cc0a5fb2664c37822803b06dab20c7d1.tar.gz",
"https://github.com/bazelbuild/rules_closure/archive/dbb96841cc0a5fb2664c37822803b06dab20c7d1.tar.gz",
],
)
[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-26 12:37:24 -08:00
# To update TensorFlow to a new revision,
# a) update URL and strip_prefix to the new git commit hash
# b) get the sha256 hash of the commit by running:
# curl -L https://github.com/tensorflow/tensorflow/archive/<git hash>.tar.gz | sha256sum
# and update the sha256 with the result.
http_archive(
name = "org_tensorflow",
2018-12-06 07:03:28 -08:00
sha256 = "dccd52030b173ee803191134215f712df7b18ee97a7c7d00437014002d29c26b",
2018-12-06 07:13:27 -08:00
strip_prefix = "tensorflow-8ccf1ebdbf4475bc7af6d79b2fa7e1fd8221e3fd",
[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-26 12:37:24 -08:00
urls = [
2018-12-06 07:13:27 -08:00
"https://github.com/tensorflow/tensorflow/archive/8ccf1ebdbf4475bc7af6d79b2fa7e1fd8221e3fd.tar.gz",
[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-26 12:37:24 -08:00
],
)
# For development, one can use a local TF repository instead.
# local_repository(
# name = "org_tensorflow",
# path = "tensorflow",
# )
2018-11-17 18:03:33 -08:00
load("@org_tensorflow//tensorflow:workspace.bzl", "tf_workspace")
tf_workspace(
path_prefix = "",
tf_repo_name = "org_tensorflow",
)