1"""Loads the cpuinfo library, used by XNNPACK.""" 2 3load("//third_party:repo.bzl", "third_party_http_archive") 4 5# Sanitize a dependency so that it works correctly from code that includes 6# TensorFlow as a submodule. 7def clean_dep(dep): 8 return str(Label(dep)) 9 10def repo(): 11 third_party_http_archive( 12 name = "cpuinfo", 13 strip_prefix = "cpuinfo-6cecd15784fcb6c5c0aa7311c6248879ce2cb8b2", 14 sha256 = "b1f2ee97e46d8917a66bcb47452fc510d511829556c93b83e06841b9b35261a5", 15 urls = [ 16 "https://storage.googleapis.com/mirror.tensorflow.org/github.com/pytorch/cpuinfo/archive/6cecd15784fcb6c5c0aa7311c6248879ce2cb8b2.zip", 17 "https://github.com/pytorch/cpuinfo/archive/6cecd15784fcb6c5c0aa7311c6248879ce2cb8b2.zip", 18 ], 19 build_file = "//third_party/cpuinfo:BUILD.bazel", 20 patch_file = clean_dep("//third_party/cpuinfo:cpuinfo.patch"), 21 ) 22