-
Notifications
You must be signed in to change notification settings - Fork 1
/
WORKSPACE.bazel
164 lines (133 loc) · 5.24 KB
/
WORKSPACE.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
BAZEL_BOOTLIN_VERSION = "81204765683aa144fe537da97b0a1d6c3e4eac38"
http_archive(
name = "bazel_bootlin",
sha256 = "72c90d841f7e2a00f35052388e0e48b5b1619584a49306abe11a98d0d9a9b01b",
strip_prefix = "bazel_bootlin-%s" % BAZEL_BOOTLIN_VERSION,
url = "https://github.com/oliverlee/bazel_bootlin/archive/%s.tar.gz" % BAZEL_BOOTLIN_VERSION,
)
load("@bazel_bootlin//:defs.bzl", "bootlin_toolchain")
bootlin_toolchain(
name = "gcc_12_toolchain",
architecture = "x86-64",
# see https://toolchains.bootlin.com/releases_x86-64.html
buildroot_version = "bleeding-edge-2022.08-1",
extra_cxx_flags = [
"-std=c++23",
"-march=native",
"-fdiagnostics-color=always",
"-Werror",
"-Wall",
"-Wextra",
"-Wpedantic",
"-Wconversion",
"-Wshadow",
"-Wnon-virtual-dtor",
"-Wold-style-cast",
"-Wcast-align",
"-Wunused",
"-Woverloaded-virtual",
"-Wmisleading-indentation",
"-Wnull-dereference",
"-Wdouble-promotion",
"-Wformat=2",
"-Wimplicit-fallthrough",
"-Wduplicated-cond",
"-Wduplicated-branches",
"-Wlogical-op",
"-Wuseless-cast",
],
libc_impl = "glibc",
)
register_toolchains(
"@{toolchain_name}//:toolchain".format(toolchain_name = "gcc_12_toolchain"),
)
RULES_CUDA_VERSION = "24e5d37bbd6f962981ff29a80715917526d8201e"
http_archive(
name = "rules_cuda",
sha256 = "6f7ecbf6a86e1347dc1c790f149ce5f22b1e2a21ba96be1590654c7fc5de7361",
strip_prefix = "rules_cuda-%s" % RULES_CUDA_VERSION,
url = "https://github.com/bazel-contrib/rules_cuda/archive/%s.tar.gz" % RULES_CUDA_VERSION,
)
load("@rules_cuda//cuda:repositories.bzl", "register_detected_cuda_toolchains", "rules_cuda_dependencies")
rules_cuda_dependencies()
register_detected_cuda_toolchains()
HIP_CPU_VERSION = "06186c545308173babda129d6f0cb795b322a5c7"
http_archive(
name = "hip_cpu",
build_file = "//:third_party/hip_cpu.BUILD.bazel",
sha256 = "e76b3c35e380971439268a8f8bff5adaa4fadfb5b45d76e3c919dee884988d83",
strip_prefix = "HIP-CPU-%s" % HIP_CPU_VERSION,
url = "https://github.com/ROCm-Developer-Tools/HIP-CPU/archive/%s.tar.gz" % HIP_CPU_VERSION,
)
ONETBB_VERSION = "2021.9.0"
http_archive(
name = "onetbb",
sha256 = "1ce48f34dada7837f510735ff1172f6e2c261b09460e3bf773b49791d247d24e",
strip_prefix = "oneTBB-%s" % ONETBB_VERSION,
url = "https://github.com/oneapi-src/oneTBB/archive/refs/tags/v%s.tar.gz" % ONETBB_VERSION,
)
HIPAMD_VERSION = "1a3ac3859edb7c49c18712d3816dc9d411edb434"
http_archive(
name = "hipamd",
build_file = "//:third_party/hipamd.BUILD.bazel",
sha256 = "b40bfa9ef44e0063ce7005dc8de0b05cea6c5baedbbabc5565e3ee5580f1a9aa",
strip_prefix = "hipamd-%s" % HIPAMD_VERSION,
# TODO: switch to upstream if https://github.com/ROCm-Developer-Tools/hipamd/pull/74 is merged.
url = "https://github.com/garymm/hipamd/archive/%s.tar.gz" % HIPAMD_VERSION,
)
HIP_VERSION = "rocm-5.5.0"
http_archive(
name = "hip",
build_file = "//:third_party/hip.BUILD.bazel",
sha256 = "5b0d0253e62f85cc21d043513f7c11c64e4a4ec416159668f0b160d732d09a3c",
strip_prefix = "HIP-%s" % HIP_VERSION,
url = "https://github.com/ROCm-Developer-Tools/HIP/archive/refs/tags/%s.tar.gz" % HIP_VERSION,
)
load("//:tools/system_repo.bzl", "system_repo")
system_repo(
name = "system_libs_linux_x86_64",
build_file = "//:third_party/system_libs_linux_x86_64.BUILD.bazel",
symlinks = {
"x86_64-linux-gnu": "/usr/lib/x86_64-linux-gnu",
"include": "/usr/include",
},
)
system_repo(
name = "cuda",
build_file = "//:third_party/cuda.BUILD.bazel",
symlinks = {
"include": "/usr/local/cuda/targets/x86_64-linux/include",
},
)
RULES_FOREIGN_CC_VERSION = "2ee029a7448d578da178f232bbb14d9191a32701"
http_archive(
name = "rules_foreign_cc",
sha256 = "a717fc9101e2c46bda5dea104e0b20da41377de93d0ad68bb8993d3e6b80c6d0",
strip_prefix = "rules_foreign_cc-%s" % RULES_FOREIGN_CC_VERSION,
url = "https://github.com/bazelbuild/rules_foreign_cc/archive/%s.tar.gz" % RULES_FOREIGN_CC_VERSION,
)
load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")
rules_foreign_cc_dependencies()
OPENSYCL_VERSION = "27542ab71a72a0dfefdca58c2b0a42462a9c5300"
http_archive(
name = "opensycl",
build_file = "//:third_party/opensycl.BUILD.bazel",
patch_args = ["-p1"],
patches = [
"//:third_party/opensycl-0001.patch",
"//:third_party/opensycl-0002.patch",
],
sha256 = "fd6fb30900090af07ee58602b9a30f5244b66ef838f0c6393d4edd0316b664b7",
strip_prefix = "OpenSYCL-%s" % OPENSYCL_VERSION,
url = "https://github.com/OpenSYCL/OpenSYCL/archive/%s.tar.gz" % OPENSYCL_VERSION,
)
RULES_BOOST_VERSION = "929f5412553c5295d30b16858da7cbefba0d0870"
http_archive(
name = "com_github_nelhage_rules_boost",
sha256 = "3eb32a58b83b21fd5ab3f927bcefc85d721f015aa1fcec6d3f452f9a3975f92f",
strip_prefix = "rules_boost-%s" % RULES_BOOST_VERSION,
url = "https://github.com/nelhage/rules_boost/archive/%s.tar.gz" % RULES_BOOST_VERSION,
)
load("@com_github_nelhage_rules_boost//:boost/boost.bzl", "boost_deps")
boost_deps()