1"""Provides the repository macro to import farmhash.""" 2 3load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") 4 5def repo(): 6 """Imports farmhash.""" 7 8 # Attention: tools parse and update these lines. 9 # LINT.IfChange 10 FARMHASH_COMMIT = "0d859a811870d10f53a594927d0d0b97573ad06d" 11 FARMHASH_SHA256 = "18392cf0736e1d62ecbb8d695c31496b6507859e8c75541d7ad0ba092dc52115" 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 = tf_mirror_urls("https://github.com/google/farmhash/archive/{commit}.tar.gz".format(commit = FARMHASH_COMMIT)), 20 ) 21 22 tf_http_archive( 23 name = "farmhash_gpu_archive", 24 build_file = "//third_party/farmhash:farmhash_gpu.BUILD", 25 patch_file = ["//third_party/farmhash:farmhash_support_cuda.patch"], 26 sha256 = FARMHASH_SHA256, 27 strip_prefix = "farmhash-{commit}".format(commit = FARMHASH_COMMIT), 28 urls = tf_mirror_urls("https://github.com/google/farmhash/archive/{commit}.tar.gz".format(commit = FARMHASH_COMMIT)), 29 ) 30