1load("//third_party/flatbuffers:workspace.bzl", flatbuffers = "repo")
2load("//third_party/kissfft:workspace.bzl", kissfft = "repo")
3load("//third_party/ruy:workspace.bzl", ruy = "repo")
4load("//third_party:repo.bzl", "tf_http_archive")
5
6def initialize_third_party():
7    """ Load third party repositories.  See above load() statements. """
8    flatbuffers()
9    kissfft()
10    ruy()
11
12# Sanitize a dependency so that it works correctly from code that includes
13# TensorFlow as a submodule.
14def clean_dep(dep):
15    return str(Label(dep))
16
17def tf_repositories(path_prefix = "", tf_repo_name = ""):
18    """All external dependencies for TF builds."""
19    # https://github.com/bazelbuild/bazel-skylib/releases
20    tf_http_archive(
21        name = "bazel_skylib",
22        sha256 = "1dde365491125a3db70731e25658dfdd3bc5dbdfd11b840b3e987ecf043c7ca0",
23        urls = [
24            "https://storage.googleapis.com/mirror.tensorflow.org/github.com/bazelbuild/bazel-skylib/releases/download/0.9.0/bazel_skylib-0.9.0.tar.gz",
25            "https://github.com/bazelbuild/bazel-skylib/releases/download/0.9.0/bazel_skylib-0.9.0.tar.gz",
26        ],
27    )
28
29    tf_http_archive(
30        name = "gemmlowp",
31        sha256 = "43146e6f56cb5218a8caaab6b5d1601a083f1f31c06ff474a4378a7d35be9cfb",  # SHARED_GEMMLOWP_SHA
32        strip_prefix = "gemmlowp-fda83bdc38b118cc6b56753bd540caa49e570745",
33        urls = [
34            "https://storage.googleapis.com/mirror.tensorflow.org/github.com/google/gemmlowp/archive/fda83bdc38b118cc6b56753bd540caa49e570745.zip",
35            "https://github.com/google/gemmlowp/archive/fda83bdc38b118cc6b56753bd540caa49e570745.zip",
36        ],
37    )
38
39    initialize_third_party()
40
41def workspace():
42    tf_repositories()
43