George Gensure | 447bcd3 | 2020-04-06 22:48:33 -0700 | [diff] [blame] | 1 | workspace(name = "pytorch") |
| 2 | |
| 3 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
Thuyen Ngo | e35bf56 | 2021-12-17 13:41:24 -0800 | [diff] [blame] | 4 | load("//tools/rules:workspace.bzl", "new_patched_local_repository") |
| 5 | |
| 6 | http_archive( |
| 7 | name = "rules_cuda", |
| 8 | sha256 = "f80438bee9906e9ecb1a8a4ae2365374ac1e8a283897281a2db2fb7fcf746333", |
| 9 | strip_prefix = "runtime-b1c7cce21ba4661c17ac72421c6a0e2015e7bef3/third_party/rules_cuda", |
| 10 | urls = ["https://github.com/tensorflow/runtime/archive/b1c7cce21ba4661c17ac72421c6a0e2015e7bef3.tar.gz"], |
| 11 | ) |
| 12 | |
| 13 | load("@rules_cuda//cuda:dependencies.bzl", "rules_cuda_dependencies") |
| 14 | |
| 15 | rules_cuda_dependencies() |
| 16 | |
| 17 | load("@rules_cc//cc:repositories.bzl", "rules_cc_toolchains") |
| 18 | |
| 19 | rules_cc_toolchains() |
George Gensure | 447bcd3 | 2020-04-06 22:48:33 -0700 | [diff] [blame] | 20 | |
| 21 | http_archive( |
| 22 | name = "bazel_skylib", |
| 23 | urls = [ |
| 24 | "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz", |
| 25 | ], |
| 26 | ) |
| 27 | |
| 28 | http_archive( |
George Gensure | 447bcd3 | 2020-04-06 22:48:33 -0700 | [diff] [blame] | 29 | name = "pybind11_bazel", |
Sergei Vorobev | a0a23c6 | 2022-06-06 21:58:47 +0000 | [diff] [blame] | 30 | strip_prefix = "pybind11_bazel-992381ced716ae12122360b0fbadbc3dda436dbf", |
| 31 | urls = ["https://github.com/pybind/pybind11_bazel/archive/992381ced716ae12122360b0fbadbc3dda436dbf.zip"], |
| 32 | sha256 = "3dc6435bd41c058453efe102995ef084d0a86b0176fd6a67a6b7100a2e9a940e", |
George Gensure | 447bcd3 | 2020-04-06 22:48:33 -0700 | [diff] [blame] | 33 | ) |
| 34 | |
| 35 | new_local_repository( |
| 36 | name = "pybind11", |
| 37 | build_file = "@pybind11_bazel//:pybind11.BUILD", |
| 38 | path = "third_party/pybind11", |
| 39 | ) |
| 40 | |
| 41 | http_archive( |
| 42 | name = "com_github_glog", |
| 43 | strip_prefix = "glog-0.4.0", |
| 44 | urls = [ |
| 45 | "https://github.com/google/glog/archive/v0.4.0.tar.gz", |
| 46 | ], |
| 47 | ) |
| 48 | |
| 49 | http_archive( |
| 50 | name = "com_github_gflags_gflags", |
| 51 | strip_prefix = "gflags-2.2.2", |
| 52 | urls = [ |
| 53 | "https://github.com/gflags/gflags/archive/v2.2.2.tar.gz", |
| 54 | ], |
| 55 | sha256 = "34af2f15cf7367513b352bdcd2493ab14ce43692d2dcd9dfc499492966c64dcf", |
| 56 | ) |
| 57 | |
| 58 | new_local_repository( |
| 59 | name = "gloo", |
| 60 | build_file = "//third_party:gloo.BUILD", |
| 61 | path = "third_party/gloo", |
| 62 | ) |
| 63 | |
| 64 | new_local_repository( |
| 65 | name = "onnx", |
| 66 | build_file = "//third_party:onnx.BUILD", |
| 67 | path = "third_party/onnx", |
| 68 | ) |
| 69 | |
| 70 | new_local_repository( |
| 71 | name = "foxi", |
| 72 | build_file = "//third_party:foxi.BUILD", |
| 73 | path = "third_party/foxi", |
| 74 | ) |
| 75 | |
| 76 | local_repository( |
| 77 | name = "com_google_protobuf", |
| 78 | path = "third_party/protobuf", |
| 79 | ) |
| 80 | |
| 81 | new_local_repository( |
| 82 | name = "eigen", |
| 83 | build_file = "//third_party:eigen.BUILD", |
| 84 | path = "third_party/eigen", |
| 85 | ) |
| 86 | |
| 87 | new_local_repository( |
| 88 | name = "fbgemm", |
Nikita Shulga | 5a7f889 | 2020-04-13 15:59:48 -0700 | [diff] [blame] | 89 | build_file = "//third_party:fbgemm/BUILD.bazel", |
George Gensure | 447bcd3 | 2020-04-06 22:48:33 -0700 | [diff] [blame] | 90 | path = "third_party/fbgemm", |
| 91 | ) |
| 92 | |
| 93 | new_local_repository( |
| 94 | name = "ideep", |
| 95 | build_file = "//third_party:ideep.BUILD", |
| 96 | path = "third_party/ideep", |
| 97 | ) |
| 98 | |
| 99 | new_local_repository( |
| 100 | name = "mkl_dnn", |
| 101 | build_file = "//third_party:mkl-dnn.BUILD", |
| 102 | path = "third_party/ideep/mkl-dnn", |
| 103 | ) |
| 104 | |
| 105 | new_local_repository( |
| 106 | name = "cpuinfo", |
| 107 | build_file = "//third_party:cpuinfo.BUILD", |
| 108 | path = "third_party/cpuinfo", |
| 109 | ) |
| 110 | |
| 111 | new_local_repository( |
| 112 | name = "asmjit", |
Nikita Shulga | 5a7f889 | 2020-04-13 15:59:48 -0700 | [diff] [blame] | 113 | build_file = "//third_party:fbgemm/third_party/asmjit.BUILD", |
George Gensure | 447bcd3 | 2020-04-06 22:48:33 -0700 | [diff] [blame] | 114 | path = "third_party/fbgemm/third_party/asmjit", |
| 115 | ) |
| 116 | |
| 117 | new_local_repository( |
| 118 | name = "sleef", |
| 119 | build_file = "//third_party:sleef.BUILD", |
| 120 | path = "third_party/sleef", |
| 121 | ) |
| 122 | |
Michael Suo | 68895ed | 2020-04-29 09:03:31 -0700 | [diff] [blame] | 123 | new_local_repository( |
| 124 | name = "fmt", |
| 125 | build_file = "//third_party:fmt.BUILD", |
| 126 | path = "third_party/fmt", |
| 127 | ) |
| 128 | |
Taylor Robie | 9d3c35d | 2022-07-14 18:35:53 -0700 | [diff] [blame] | 129 | new_local_repository( |
| 130 | name = "kineto", |
| 131 | build_file = "//third_party:kineto.BUILD", |
| 132 | path = "third_party/kineto", |
| 133 | ) |
| 134 | |
George Gensure | 447bcd3 | 2020-04-06 22:48:33 -0700 | [diff] [blame] | 135 | new_patched_local_repository( |
| 136 | name = "tbb", |
| 137 | patches = [ |
| 138 | "@//third_party:tbb.patch", |
| 139 | ], |
| 140 | patch_strip = 1, |
| 141 | build_file = "//third_party:tbb.BUILD", |
| 142 | path = "third_party/tbb", |
| 143 | ) |
| 144 | |
Luca Wehrstedt | 5baa6b6 | 2020-05-02 01:22:18 -0700 | [diff] [blame] | 145 | new_local_repository( |
| 146 | name = "tensorpipe", |
| 147 | build_file = "//third_party:tensorpipe.BUILD", |
| 148 | path = "third_party/tensorpipe", |
| 149 | ) |
| 150 | |
George Gensure | 447bcd3 | 2020-04-06 22:48:33 -0700 | [diff] [blame] | 151 | http_archive( |
| 152 | name = "mkl", |
| 153 | build_file = "//third_party:mkl.BUILD", |
| 154 | strip_prefix = "lib", |
| 155 | sha256 = "59154b30dd74561e90d547f9a3af26c75b6f4546210888f09c9d4db8f4bf9d4c", |
| 156 | urls = [ |
| 157 | "https://anaconda.org/anaconda/mkl/2020.0/download/linux-64/mkl-2020.0-166.tar.bz2", |
| 158 | ], |
| 159 | ) |
| 160 | |
| 161 | http_archive( |
| 162 | name = "mkl_headers", |
| 163 | build_file = "//third_party:mkl_headers.BUILD", |
| 164 | sha256 = "2af3494a4bebe5ddccfdc43bacc80fcd78d14c1954b81d2c8e3d73b55527af90", |
| 165 | urls = [ |
| 166 | "https://anaconda.org/anaconda/mkl-include/2020.0/download/linux-64/mkl-include-2020.0-166.tar.bz2", |
| 167 | ], |
| 168 | ) |
| 169 | |
| 170 | http_archive( |
| 171 | name = "rules_python", |
| 172 | url = "https://github.com/bazelbuild/rules_python/releases/download/0.0.1/rules_python-0.0.1.tar.gz", |
| 173 | sha256 = "aa96a691d3a8177f3215b14b0edc9641787abaaa30363a080165d06ab65e1161", |
| 174 | ) |
| 175 | |
| 176 | load("@pybind11_bazel//:python_configure.bzl", "python_configure") |
Sergei Vorobev | a0a23c6 | 2022-06-06 21:58:47 +0000 | [diff] [blame] | 177 | python_configure(name = "local_config_python", python_version="3") |
George Gensure | 447bcd3 | 2020-04-06 22:48:33 -0700 | [diff] [blame] | 178 | |
| 179 | load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") |
| 180 | |
| 181 | protobuf_deps() |
| 182 | |
| 183 | load("@rules_python//python:repositories.bzl", "py_repositories") |
| 184 | |
| 185 | py_repositories() |
Sergei Vorobev | f922b58 | 2021-08-27 09:31:36 -0700 | [diff] [blame] | 186 | |
Thuyen Ngo | e35bf56 | 2021-12-17 13:41:24 -0800 | [diff] [blame] | 187 | new_local_repository( |
| 188 | name = "cuda", |
| 189 | build_file = "@//third_party:cuda.BUILD", |
| 190 | path = "/usr/local/cuda", |
Sergei Vorobev | f922b58 | 2021-08-27 09:31:36 -0700 | [diff] [blame] | 191 | ) |
| 192 | |
Thuyen Ngo | e35bf56 | 2021-12-17 13:41:24 -0800 | [diff] [blame] | 193 | new_local_repository( |
| 194 | name = "cudnn", |
| 195 | build_file = "@//third_party:cudnn.BUILD", |
| 196 | path = "/usr/", |
Sergei Vorobev | f922b58 | 2021-08-27 09:31:36 -0700 | [diff] [blame] | 197 | ) |
Han Qi | 1bc3571 | 2022-01-12 16:27:21 -0800 | [diff] [blame] | 198 | |
| 199 | local_repository( |
| 200 | name = "com_github_google_flatbuffers", |
| 201 | path = "third_party/flatbuffers", |
| 202 | ) |
Sergei Vorobev | a0a23c6 | 2022-06-06 21:58:47 +0000 | [diff] [blame] | 203 | |
| 204 | local_repository( |
| 205 | name = "google_benchmark", |
| 206 | path = "third_party/benchmark", |
| 207 | ) |
| 208 | |
| 209 | local_repository( |
| 210 | name = "com_google_googletest", |
| 211 | path = "third_party/googletest", |
| 212 | ) |
| 213 | |
| 214 | local_repository( |
| 215 | name = "pthreadpool", |
| 216 | path = "third_party/pthreadpool", |
| 217 | repo_mapping = {"@com_google_benchmark" : "@google_benchmark"} |
| 218 | ) |
| 219 | |
| 220 | local_repository( |
| 221 | name = "FXdiv", |
| 222 | path = "third_party/FXdiv", |
| 223 | repo_mapping = {"@com_google_benchmark" : "@google_benchmark"} |
| 224 | ) |
| 225 | |
| 226 | local_repository( |
| 227 | name = "XNNPACK", |
| 228 | path = "third_party/XNNPACK", |
| 229 | repo_mapping = {"@com_google_benchmark" : "@google_benchmark"} |
| 230 | ) |
| 231 | |
| 232 | local_repository( |
| 233 | name = "gemmlowp", |
| 234 | path = "third_party/gemmlowp/gemmlowp", |
| 235 | ) |
| 236 | |
| 237 | ### Unused repos start |
| 238 | |
| 239 | # `unused` repos are defined to hide bazel files from submodules of submodules. |
| 240 | # This allows us to run `bazel build //...` and not worry about the submodules madness. |
| 241 | # Otherwise everything traverses recursively and a lot of submodules of submodules have |
| 242 | # they own bazel build files. |
| 243 | |
| 244 | local_repository( |
| 245 | name = "unused_tensorpipe_googletest", |
| 246 | path = "third_party/tensorpipe/third_party/googletest", |
| 247 | ) |
| 248 | |
| 249 | local_repository( |
| 250 | name = "unused_fbgemm", |
| 251 | path = "third_party/fbgemm", |
| 252 | ) |
| 253 | |
| 254 | local_repository( |
| 255 | name = "unused_kineto_googletest", |
| 256 | path = "third_party/kineto/libkineto/third_party/googletest", |
| 257 | ) |
| 258 | |
| 259 | local_repository( |
| 260 | name = "unused_onnx_benchmark", |
| 261 | path = "third_party/onnx/third_party/benchmark", |
| 262 | ) |
| 263 | |
| 264 | local_repository( |
| 265 | name = "unused_onnx_tensorrt_benchmark", |
| 266 | path = "third_party/onnx-tensorrt/third_party/onnx/third_party/benchmark", |
| 267 | ) |
| 268 | |
| 269 | ### Unused repos end |