1workspace(name = "xnnpack") 2 3load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") 4 5# Bazel rule definitions 6http_archive( 7 name = "rules_cc", 8 strip_prefix = "rules_cc-master", 9 urls = ["https://github.com/bazelbuild/rules_cc/archive/master.zip"], 10) 11 12# Google Test framework, used by most unit-tests. 13http_archive( 14 name = "com_google_googletest", 15 strip_prefix = "googletest-master", 16 urls = ["https://github.com/google/googletest/archive/master.zip"], 17) 18 19# Google Benchmark library, used in micro-benchmarks. 20http_archive( 21 name = "com_google_benchmark", 22 strip_prefix = "benchmark-master", 23 urls = ["https://github.com/google/benchmark/archive/master.zip"], 24) 25 26# FP16 library, used for half-precision conversions 27http_archive( 28 name = "FP16", 29 strip_prefix = "FP16-3c54eacb74f6f5e39077300c5564156c424d77ba", 30 sha256 = "0d56bb92f649ec294dbccb13e04865e3c82933b6f6735d1d7145de45da700156", 31 urls = [ 32 "https://github.com/Maratyszcza/FP16/archive/3c54eacb74f6f5e39077300c5564156c424d77ba.zip", 33 ], 34 build_file = "@//third_party:FP16.BUILD", 35) 36 37# FXdiv library, used for repeated integer division by the same factor 38http_archive( 39 name = "FXdiv", 40 strip_prefix = "FXdiv-b408327ac2a15ec3e43352421954f5b1967701d1", 41 sha256 = "ab7dfb08829bee33dca38405d647868fb214ac685e379ec7ef2bebcd234cd44d", 42 urls = ["https://github.com/Maratyszcza/FXdiv/archive/b408327ac2a15ec3e43352421954f5b1967701d1.zip"], 43) 44 45# pthreadpool library, used for parallelization 46http_archive( 47 name = "pthreadpool", 48 strip_prefix = "pthreadpool-b8374f80e42010941bda6c85b0e3f1a1bd77a1e0", 49 sha256 = "b96413b10dd8edaa4f6c0a60c6cf5ef55eebeef78164d5d69294c8173457f0ec", 50 urls = ["https://github.com/Maratyszcza/pthreadpool/archive/b8374f80e42010941bda6c85b0e3f1a1bd77a1e0.zip"], 51) 52 53# clog library, used for logging 54http_archive( 55 name = "clog", 56 strip_prefix = "cpuinfo-d5e37adf1406cf899d7d9ec1d317c47506ccb970", 57 sha256 = "3f2dc1970f397a0e59db72f9fca6ff144b216895c1d606f6c94a507c1e53a025", 58 urls = [ 59 "https://github.com/pytorch/cpuinfo/archive/d5e37adf1406cf899d7d9ec1d317c47506ccb970.tar.gz", 60 ], 61 build_file = "@//third_party:clog.BUILD", 62) 63 64 65# cpuinfo library, used for detecting processor characteristics 66http_archive( 67 name = "cpuinfo", 68 strip_prefix = "cpuinfo-ed8b86a253800bafdb7b25c5c399f91bff9cb1f3", 69 sha256 = "a7f9a188148a1660149878f737f42783e72f33a4f842f3e362fee2c981613e53", 70 urls = [ 71 "https://github.com/pytorch/cpuinfo/archive/ed8b86a253800bafdb7b25c5c399f91bff9cb1f3.zip", 72 ], 73 build_file = "@//third_party:cpuinfo.BUILD", 74 patches = ["@//third_party:cpuinfo.patch"], 75) 76 77# Ruy library, used to benchmark against 78http_archive( 79 name = "ruy", 80 strip_prefix = "ruy-9f53ba413e6fc879236dcaa3e008915973d67a4f", 81 sha256 = "fe8345f521bb378745ebdd0f8c5937414849936851d2ec2609774eb2d7098e54", 82 urls = [ 83 "https://github.com/google/ruy/archive/9f53ba413e6fc879236dcaa3e008915973d67a4f.zip", 84 ], 85) 86 87# Android NDK location and version is auto-detected from $ANDROID_NDK_HOME environment variable 88android_ndk_repository(name = "androidndk") 89 90# Android SDK location and API is auto-detected from $ANDROID_HOME environment variable 91android_sdk_repository(name = "androidsdk") 92