xref: /aosp_15_r20/external/XNNPACK/WORKSPACE (revision 4bdc94577ba0e567308109d787f7fec7b531ce36)
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-main",
9    urls = ["https://github.com/bazelbuild/rules_cc/archive/main.zip"],
10)
11
12# Bazel Skylib.
13http_archive(
14    name = "bazel_skylib",
15    urls = [
16        "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.2.1/bazel-skylib-1.2.1.tar.gz",
17        "https://github.com/bazelbuild/bazel-skylib/releases/download/1.2.1/bazel-skylib-1.2.1.tar.gz",
18    ],
19    sha256 = "f7be3474d42aae265405a592bb7da8e171919d74c16f082a5457840f06054728",
20)
21
22# Google Test framework, used by most unit-tests.
23http_archive(
24    name = "com_google_googletest",
25    strip_prefix = "googletest-master",
26    urls = ["https://github.com/google/googletest/archive/master.zip"],
27)
28
29# Google Benchmark library, used in micro-benchmarks.
30http_archive(
31    name = "com_google_benchmark",
32    strip_prefix = "benchmark-master",
33    urls = ["https://github.com/google/benchmark/archive/master.zip"],
34)
35
36# FP16 library, used for half-precision conversions
37http_archive(
38    name = "FP16",
39    strip_prefix = "FP16-0a92994d729ff76a58f692d3028ca1b64b145d91",
40    sha256 = "e66e65515fa09927b348d3d584c68be4215cfe664100d01c9dbc7655a5716d70",
41    urls = [
42        "https://github.com/Maratyszcza/FP16/archive/0a92994d729ff76a58f692d3028ca1b64b145d91.zip",
43    ],
44    build_file = "@//third_party:FP16.BUILD",
45)
46
47# FXdiv library, used for repeated integer division by the same factor
48http_archive(
49    name = "FXdiv",
50    strip_prefix = "FXdiv-b408327ac2a15ec3e43352421954f5b1967701d1",
51    sha256 = "ab7dfb08829bee33dca38405d647868fb214ac685e379ec7ef2bebcd234cd44d",
52    urls = ["https://github.com/Maratyszcza/FXdiv/archive/b408327ac2a15ec3e43352421954f5b1967701d1.zip"],
53)
54
55# pthreadpool library, used for parallelization
56http_archive(
57    name = "pthreadpool",
58    strip_prefix = "pthreadpool-b8374f80e42010941bda6c85b0e3f1a1bd77a1e0",
59    sha256 = "b96413b10dd8edaa4f6c0a60c6cf5ef55eebeef78164d5d69294c8173457f0ec",
60    urls = ["https://github.com/Maratyszcza/pthreadpool/archive/b8374f80e42010941bda6c85b0e3f1a1bd77a1e0.zip"],
61)
62
63# clog library, used for logging
64http_archive(
65    name = "clog",
66    strip_prefix = "cpuinfo-49610f89b8b1eb52d75d1eda7a2c40c1e86a78e7",
67    sha256 = "25843b5f21c32cba89f9b921c0500ab5cd0c2cb8fb0f345e5b5e4678329386c7",
68    urls = [
69        "https://github.com/pytorch/cpuinfo/archive/49610f89b8b1eb52d75d1eda7a2c40c1e86a78e7.tar.gz",
70    ],
71    build_file = "@//third_party:clog.BUILD",
72)
73
74# cpuinfo library, used for detecting processor characteristics
75http_archive(
76    name = "cpuinfo",
77    strip_prefix = "cpuinfo-49610f89b8b1eb52d75d1eda7a2c40c1e86a78e7",
78    sha256 = "25843b5f21c32cba89f9b921c0500ab5cd0c2cb8fb0f345e5b5e4678329386c7",
79    urls = [
80        "https://github.com/pytorch/cpuinfo/archive/49610f89b8b1eb52d75d1eda7a2c40c1e86a78e7.zip",
81    ],
82    build_file = "@//third_party:cpuinfo.BUILD",
83)
84
85# Ruy library, used to benchmark against
86http_archive(
87   name = "ruy",
88   strip_prefix = "ruy-9f53ba413e6fc879236dcaa3e008915973d67a4f",
89   sha256 = "fe8345f521bb378745ebdd0f8c5937414849936851d2ec2609774eb2d7098e54",
90   urls = [
91       "https://github.com/google/ruy/archive/9f53ba413e6fc879236dcaa3e008915973d67a4f.zip",
92   ],
93)
94
95# Android NDK location and version is auto-detected from $ANDROID_NDK_HOME environment variable
96android_ndk_repository(name = "androidndk")
97
98# Android SDK location and API is auto-detected from $ANDROID_HOME environment variable
99android_sdk_repository(name = "androidsdk")
100