Skip to content

Commit 4cc2c5d

Browse files
committed
fix jax workspace importing
1 parent a5fd632 commit 4cc2c5d

File tree

1 file changed

+10
-36
lines changed

1 file changed

+10
-36
lines changed

deps/ReactantExtra/WORKSPACE

Lines changed: 10 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ NSYNC_COMMIT = "82b118aa7ace3132e517e2c467f8732978cf4023"
44

55
NSYNC_SHA256 = ""
66

7-
ENZYMEXLA_COMMIT = "09fa45e39eb458ac33e957826a0c17409f6e3fc7"
7+
ENZYMEXLA_COMMIT = "531dfe3e48d65e5838437e593b04e09a783a5f39"
88

99
ENZYMEXLA_SHA256 = ""
1010

@@ -22,8 +22,6 @@ http_archive(
2222
urls = ["https://github.com/EnzymeAD/Enzyme-JAX/archive/{commit}.tar.gz".format(commit = ENZYMEXLA_COMMIT)],
2323
)
2424

25-
load("@enzyme_ad//:workspace.bzl", "ENZYME_COMMIT", "ENZYME_SHA256", "JAX_COMMIT", "JAX_SHA256", "XLA_PATCHES")
26-
2725
CUPTI_OLD = [
2826
"""
2927
sed -i.bak0 "s/cupti_driver_cbid/cupti/g" xla/backends/profiler/gpu/cupti_tracer.cc
@@ -38,7 +36,7 @@ sed -i.bak0 "/CUPTI_DRIVER_TRACE_CBID_cuGraphAddNode_v2/d" xla/backends/profiler
3836

3937
CUPTI_NEW = []
4038

41-
XLA_PATCHES = XLA_PATCHES + CUPTI_NEW + [
39+
NEW_XLA_PATCHES = CUPTI_NEW + [
4240
"""
4341
sed -i.bak0 "s/Shlwapi/shlwapi/g" xla/tsl/platform/windows/load_library.cc xla/tsl/platform/windows/windows_file_system.cc xla/tsl/platform/windows/env.cc
4442
""",
@@ -139,33 +137,11 @@ LLVM_TARGETS = [
139137
# ],
140138
# )
141139

142-
JAX_PATCHES = [
143-
"""
144-
sed -i.bak0 "s/ cast/ llvm::cast/g" jaxlib/mosaic/dialect/gpu/mosaic_gpu.cc
145-
""",
146-
]
147-
148-
http_archive(
149-
name = "jax",
150-
patch_args = ["-p1"],
151-
patch_cmds = JAX_PATCHES,
152-
patches = ["@enzyme_ad//:patches/jax.patch"],
153-
sha256 = JAX_SHA256,
154-
strip_prefix = "jax-" + JAX_COMMIT,
155-
urls = ["https://github.com/google/jax/archive/{commit}.tar.gz".format(commit = JAX_COMMIT)],
156-
)
157-
158-
# load("@jax//third_party/xla:revision.bzl", "XLA_COMMIT", "XLA_SHA256")
159-
XLA_COMMIT = "3db2ac3bf43c3e250ef7614eb5c8594e716ecc48"
160-
XLA_SHA256 = ""
140+
load("@enzyme_ad//third_party/jax:workspace.bzl", jax_workspace = "repo")
141+
jax_workspace()
161142

162-
http_archive(
163-
name = "xla",
164-
patch_cmds = XLA_PATCHES,
165-
sha256 = XLA_SHA256,
166-
strip_prefix = "xla-" + XLA_COMMIT,
167-
urls = ["https://github.com/giordano/xla/archive/{commit}.tar.gz".format(commit = XLA_COMMIT)],
168-
)
143+
load("@enzyme_ad//third_party/xla:workspace.bzl", xla_workspace = "repo")
144+
xla_workspace(NEW_XLA_PATCHES, override_commit = "3db2ac3bf43c3e250ef7614eb5c8594e716ecc48")
169145

170146
#
171147
# load("@xla//third_party/py:python_init_pip.bzl", "python_init_pip")
@@ -182,12 +158,10 @@ http_archive(
182158
#
183159
# pip_install_dependencies()
184160

185-
http_archive(
186-
name = "enzyme",
187-
sha256 = ENZYME_SHA256,
188-
strip_prefix = "Enzyme-" + ENZYME_COMMIT + "/enzyme",
189-
urls = ["https://github.com/EnzymeAD/Enzyme/archive/{commit}.tar.gz".format(commit = ENZYME_COMMIT)],
190-
)
161+
162+
load("@enzyme_ad//third_party/enzyme:workspace.bzl", enzyme_workspace = "repo")
163+
enzyme_workspace()
164+
191165

192166
# http_archive(
193167
# name = "upb",

0 commit comments

Comments
 (0)