Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeing committed Dec 23, 2024
1 parent 8454386 commit 387ef48
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 27 deletions.
30 changes: 4 additions & 26 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
# add support for generating compile_commands
load("//third_party/hedron_compile_commands:workspace.bzl", hedron_compile_commands_workspace = "repo")
load("//third_party/hedron_compile_commands:workspace.bzl", hedron_compile_commands_workspace = "repo", hedron_compile_commands_setup = "setup")
hedron_compile_commands_workspace()
load("@hedron_compile_commands//:workspace_setup.bzl", "hedron_compile_commands_setup")
hedron_compile_commands_setup()
load("@hedron_compile_commands//:workspace_setup_transitive.bzl", "hedron_compile_commands_setup_transitive")
hedron_compile_commands_setup_transitive()
load("@hedron_compile_commands//:workspace_setup_transitive_transitive.bzl", "hedron_compile_commands_setup_transitive_transitive")
hedron_compile_commands_setup_transitive_transitive()
load("@hedron_compile_commands//:workspace_setup_transitive_transitive_transitive.bzl", "hedron_compile_commands_setup_transitive_transitive_transitive")
hedron_compile_commands_setup_transitive_transitive_transitive()

load("//third_party/jax:workspace.bzl", jax_workspace = "repo")
jax_workspace()

load("//third_party/xla:workspace.bzl", xla_workspace = "repo")
xla_workspace()

load("//third_party/enzyme:workspace.bzl", enzyme_workspace = "repo")
enzyme_workspace()

load("@xla//third_party/py:python_init_rules.bzl", "python_init_rules")
python_init_rules()

Expand All @@ -40,30 +36,12 @@ python_init_pip()
load("@pypi//:requirements.bzl", "install_deps")
install_deps()

load("//third_party/enzyme:workspace.bzl", enzyme_workspace = "repo")
enzyme_workspace()

load("@xla//third_party/llvm:workspace.bzl", llvm = "repo")
load("//:workspace.bzl", "LLVM_TARGETS")
llvm("llvm-raw")
load("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure")
llvm_configure(name = "llvm-project", targets = LLVM_TARGETS)

load("@xla//:workspace4.bzl", "xla_workspace4")
xla_workspace4()

load("@xla//:workspace3.bzl", "xla_workspace3")
xla_workspace3()

load("@xla//:workspace2.bzl", "xla_workspace2")
xla_workspace2()

load("@xla//:workspace1.bzl", "xla_workspace1")
xla_workspace1()

load("@xla//:workspace0.bzl", "xla_workspace0")
xla_workspace0()

load("@jax//third_party/flatbuffers:workspace.bzl", flatbuffers = "repo")
flatbuffers()

Expand Down
13 changes: 13 additions & 0 deletions third_party/hedron_compile_commands/workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,16 @@ def repo():
strip_prefix = "bazel-compile-commands-extractor-4f28899228fb3ad0126897876f147ca15026151e",
# When you first run this tool, it'll recommend a sha256 hash to put here with a message like: "DEBUG: Rule 'hedron_compile_commands' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = ..."
)

def setup():
"""Setups compile_commands generation."""

load("@hedron_compile_commands//:workspace_setup.bzl", "hedron_compile_commands_setup")
load("@hedron_compile_commands//:workspace_setup_transitive.bzl", "hedron_compile_commands_setup_transitive")
load("@hedron_compile_commands//:workspace_setup_transitive_transitive.bzl", "hedron_compile_commands_setup_transitive_transitive")
load("@hedron_compile_commands//:workspace_setup_transitive_transitive_transitive.bzl", "hedron_compile_commands_setup_transitive_transitive_transitive")

hedron_compile_commands_setup()
hedron_compile_commands_setup_transitive()
hedron_compile_commands_setup_transitive_transitive()
hedron_compile_commands_setup_transitive_transitive_transitive()
14 changes: 13 additions & 1 deletion third_party/xla/workspace.bzl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Loads XLA."""

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("//:workspace.bzl", "XLA_PATCHES")
load("@jax//third_party/xla:workspace.bzl", "XLA_COMMIT", "XLA_SHA256")
load("//:workspace.bzl", "XLA_PATCHES")

def repo():
http_archive(
Expand All @@ -12,3 +12,15 @@ def repo():
urls = ["https://github.com/wsmoses/xla/archive/{commit}.tar.gz".format(commit = XLA_COMMIT)],
patch_cmds = XLA_PATCHES,
)

load("@xla//:workspace4.bzl", "xla_workspace4")
load("@xla//:workspace3.bzl", "xla_workspace3")
load("@xla//:workspace2.bzl", "xla_workspace2")
load("@xla//:workspace1.bzl", "xla_workspace1")
load("@xla//:workspace0.bzl", "xla_workspace0")

xla_workspace4()
xla_workspace3()
xla_workspace2()
xla_workspace1()
xla_workspace0()

0 comments on commit 387ef48

Please sign in to comment.