-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathworkspace.bzl
40 lines (36 loc) · 1.73 KB
/
workspace.bzl
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
JAX_COMMIT = "41993fdb24021473f6e2db8fdeeeb8b6d3f52630"
JAX_SHA256 = ""
ENZYME_COMMIT = "bf115413decd211fa8f3c7683831505de52bc362"
ENZYME_SHA256 = ""
# If the empty string this will automatically use the commit above
# otherwise this should be a path to the folder containing the BUILD file for enzyme
OVERRIDE_ENZYME_PATH = ""
HEDRON_COMPILE_COMMANDS_COMMIT = "4f28899228fb3ad0126897876f147ca15026151e"
HEDRON_COMPILE_COMMANDS_SHA256 = ""
XLA_PATCHES = [
"""
sed -i.bak0 "s/\\/\\/third_party:repo.bzl/@bazel_tools\\/\\/tools\\/build_defs\\/repo:http.bzl/g" third_party/llvm/workspace.bzl
""",
"""
sed -i.bak0 "s/patch_file/patch_args = [\\\"-p1\\\"],patches/g" third_party/llvm/workspace.bzl
""",
"""
sed -i.bak0 "/link_file/d" third_party/llvm/workspace.bzl
""",
"""
sed -i.bak0 "s/build_file.*/build_file_content = \\\"# empty\\\",/g" third_party/llvm/workspace.bzl
""",
"""
sed -i.bak0 "s/\\/\\/third_party/@xla\\/\\/third_party/g" third_party/llvm/workspace.bzl
""",
"""
sed -i.bak0 "s/tf_http_archive/http_archive/g" third_party/llvm/workspace.bzl
""",
"""
sed -i.bak0 "s/strip_prefix/patch_cmds = [\\\"find . -type f -name config.bzl -exec sed -i.bak0 's\\/HAVE_BACKTRACE=1\\/NO_HAVE_BACKTRACE=0\\/g' {} +\\\"], strip_prefix/g" third_party/llvm/workspace.bzl
""",
"find . -type f -name BUILD -exec sed -i.bak1 's/\\/\\/third_party\\/py\\/enzyme_ad\\/\\.\\.\\./public/g' {} +",
"find . -type f -name BUILD -exec sed -i.bak2 's/\\/\\/xla\\/mlir\\/memref:friends/\\/\\/visibility:public/g' {} +",
"find xla/mlir -type f -name BUILD -exec sed -i.bak3 's/\\/\\/xla:internal/\\/\\/\\/\\/visibility:public/g' {} +",
]
LLVM_TARGETS = ["X86", "AArch64", "AMDGPU", "NVPTX"]