-
Notifications
You must be signed in to change notification settings - Fork 219
Expand file tree
/
Copy pathWORKSPACE.bazel
More file actions
117 lines (94 loc) · 4 KB
/
Copy pathWORKSPACE.bazel
File metadata and controls
117 lines (94 loc) · 4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# Copyright 2023 The StableHLO Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Workspace for StableHLO."""
workspace(name = "stablehlo")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "8964aa1e7525fea5244ba737458694a057ada1be96a92998a41caa1983562d00",
strip_prefix = "rules_python-1.8.5",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.8.5/rules_python-1.8.5.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")
py_repositories()
python_register_toolchains(
name = "python_3_11",
python_version = "3.11",
)
http_archive(
name = "bazel_features",
sha256 = "5f7f87f50584df12bbfe5e461d358b16a8e15d245a7e596011bf39aaee5f58a9",
strip_prefix = "bazel_features-1.47.0",
url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.47.0/bazel_features-v1.47.0.tar.gz",
)
load("@bazel_features//:deps.bzl", "bazel_features_deps")
bazel_features_deps()
# Initialize toolchains for ML projects.
#
# A hermetic build system is designed to produce completely reproducible builds
# for C++. Details: https://github.com/google-ml-infra/rules_ml_toolchain
http_archive(
name = "rules_ml_toolchain",
patch_args = ["-p1"],
patches = ["//third_party/rules_ml_toolchain:fix_strip.patch"],
sha256 = "cfc0e72b41c1391b2d943761e24ebfe451020d7ad360a9abdcdc27dfd5e6a62f",
strip_prefix = "rules_ml_toolchain-8314786481531481ccb6279c93453488e3e944e4",
urls = [
"https://github.com/google-ml-infra/rules_ml_toolchain/archive/8314786481531481ccb6279c93453488e3e944e4.tar.gz",
],
)
load("@rules_ml_toolchain//cc/deps:cc_toolchain_deps.bzl", "cc_toolchain_deps")
cc_toolchain_deps()
register_toolchains("@rules_ml_toolchain//cc:linux_x86_64_linux_x86_64")
http_archive(
name = "bazel_skylib",
sha256 = "3b5b49006181f5f8ff626ef8ddceaa95e9bb8ad294f7b5d7b11ea9f7ddaf8c59",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.9.0/bazel-skylib-1.9.0.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.9.0/bazel-skylib-1.9.0.tar.gz",
],
)
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
bazel_skylib_workspace()
http_archive(
name = "rules_shell",
sha256 = "20721f63908879c083f94869e618ea8d4ff5edb91ff9a72a2ebee357fdbc352d",
strip_prefix = "rules_shell-0.8.0",
url = "https://github.com/bazelbuild/rules_shell/releases/download/v0.8.0/rules_shell-v0.8.0.tar.gz",
)
http_archive(
name = "net_zstd",
build_file = "//third_party:zstd.BUILD",
sha256 = "7897bc5d620580d9b7cd3539c44b59d78f3657d33663fe97a145e07b4ebd69a4",
strip_prefix = "zstd-1.5.7",
urls = [
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/facebook/zstd/archive/v1.5.7.zip",
"https://github.com/facebook/zstd/archive/v1.5.7.zip",
],
)
http_archive(
name = "zlib",
build_file = "//third_party:zlib-ng.BUILD",
sha256 = "e36bb346c00472a1f9ff2a0a4643e590a254be6379da7cddd9daeb9a7f296731",
strip_prefix = "zlib-ng-2.0.7",
urls = [
"https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.0.7.zip",
],
)
# These need to come in this specific order or else Bazel will complain about
# missing/circular dependencies.
load("//third_party/llvm:workspace.bzl", llvm = "repo")
llvm("llvm-raw")
load("//third_party/llvm:setup.bzl", "llvm_setup")
llvm_setup("llvm-project")