• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1"""Provides the repository macro to import farmhash."""
2
3load("//third_party:repo.bzl", "tf_http_archive")
4
5def repo():
6    """Imports farmhash."""
7
8    # Attention: tools parse and update these lines.
9    # LINT.IfChange
10    FARMHASH_COMMIT = "816a4ae622e964763ca0862d9dbd19324a1eaf45"
11    FARMHASH_SHA256 = "6560547c63e4af82b0f202cb710ceabb3f21347a4b996db565a411da5b17aba0"
12    # LINT.ThenChange(//tensorflow/lite/tools/cmake/modules/farmhash.cmake)
13
14    tf_http_archive(
15        name = "farmhash_archive",
16        build_file = "//third_party/farmhash:farmhash.BUILD",
17        sha256 = FARMHASH_SHA256,
18        strip_prefix = "farmhash-{commit}".format(commit = FARMHASH_COMMIT),
19        urls = [
20            "https://storage.googleapis.com/mirror.tensorflow.org/github.com/google/farmhash/archive/{commit}.tar.gz".format(commit = FARMHASH_COMMIT),
21            "https://github.com/google/farmhash/archive/{commit}.tar.gz".format(commit = FARMHASH_COMMIT),
22        ],
23    )
24
25    tf_http_archive(
26        name = "farmhash_gpu_archive",
27        build_file = "//third_party/farmhash:farmhash_gpu.BUILD",
28        patch_file = "//third_party/farmhash:farmhash_support_cuda.patch",
29        sha256 = FARMHASH_SHA256,
30        strip_prefix = "farmhash-{commit}".format(commit = FARMHASH_COMMIT),
31        urls = [
32            "https://storage.googleapis.com/mirror.tensorflow.org/github.com/google/farmhash/archive/{commit}.tar.gz".format(commit = FARMHASH_COMMIT),
33            "https://github.com/google/farmhash/archive/{commit}.tar.gz".format(commit = FARMHASH_COMMIT),
34        ],
35    )
36