-
Notifications
You must be signed in to change notification settings - Fork 108
/
Copy pathMODULE.bazel
138 lines (120 loc) · 4.02 KB
/
MODULE.bazel
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# Copyright 2024 Ant Group Co., Ltd.
#
# 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
#
# http://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.
###############################################################################
# Bazel now uses Bzlmod by default to manage external dependencies.
# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel.
#
# For more details, please check https://github.com/bazelbuild/bazel/issues/18958
###############################################################################
module(
name = "spu",
version = "0.9.4.dev20250109",
compatibility_level = 1,
)
bazel_dep(name = "apple_support", version = "1.17.1")
bazel_dep(name = "spulib")
local_path_override(
module_name = "spulib",
path = "src",
)
bazel_dep(name = "psi")
git_override(
module_name = "psi",
commit = "8ead92f1bb10329c7e7e56d541fecb3dcd47ee03",
remote = "https://github.com/secretflow/psi.git",
)
bazel_dep(name = "yacl", version = "20241212.0-871832a")
bazel_dep(name = "grpc", version = "1.66.0.bcr.3")
single_version_override(
module_name = "grpc",
patch_strip = 1,
patches = [
"//bazel/patches:grpc-1.66.patch",
"//bazel/patches:grpc-module-file.patch",
],
version = "1.66.0.bcr.3",
)
bazel_dep(name = "protobuf", version = "27.3")
single_version_override(
module_name = "protobuf",
patch_strip = 1,
patches = [
"//bazel/patches:protobuf-xla.patch",
],
version = "27.3",
)
bazel_dep(name = "pybind11_bazel", version = "2.13.6")
bazel_dep(name = "rules_cuda", version = "0.2.3")
bazel_dep(name = "rules_python", version = "0.29.0")
bazel_dep(name = "rules_proto_grpc_python", version = "5.0.0")
# For experimental/squirrel and examples/cpp
bazel_dep(name = "eigen", version = "3.4.90-20230801-66e8f3")
bazel_dep(name = "seal", version = "4.1.1")
bazel_dep(name = "spdlog", version = "1.14.1")
bazel_dep(name = "abseil-cpp", version = "20240722.0")
bazel_dep(name = "llvm-raw", version = "20240809.0-35f55f5")
llvm = use_extension("@llvm-raw//utils/bazel:extension.bzl", "llvm")
llvm.configure(
targets = [
"AArch64",
"X86",
"ARM",
],
)
use_repo(llvm, "llvm-project")
# END for experimental/squirrel and examples/cpp
DEFAULT_PYTHON_VERSION = "3.11"
SUPPORTED_PYTHON_VERSIONS = [
# "3.9",
"3.10",
"3.11",
]
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
[
python.toolchain(
ignore_root_user_error = True,
is_default = python_version == DEFAULT_PYTHON_VERSION,
python_version = python_version,
)
for python_version in SUPPORTED_PYTHON_VERSIONS
]
use_repo(python, "python_versions")
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
[
pip.parse(
hub_name = "spu_pip",
python_version = python_version,
requirements_lock = "//:requirements_lock_{}.txt".format(python_version.replace(".", "_")),
)
for python_version in SUPPORTED_PYTHON_VERSIONS
]
use_repo(pip, "spu_pip")
pip.parse(
hub_name = "spu_pip_dev",
python_version = DEFAULT_PYTHON_VERSION,
requirements_darwin = "//:requirements_dev_darwin_lock.txt",
requirements_lock = "//:requirements_dev_lock.txt",
)
pip.override(
file = "torch-2.3.0-cp311-cp311-manylinux1_x86_64.whl",
patch_strip = 1,
patches = [
# FIXME: https://github.com/pytorch/pytorch/issues/117350
"//bazel/patches:pytorch.patch",
"//bazel/patches:pytorch_record.patch",
],
)
use_repo(pip, "spu_pip_dev")
# test
bazel_dep(name = "googletest", version = "1.15.2", dev_dependency = True)