From f7450a2104245b07e7f1b2d85b0ea42ea54c0dc7 Mon Sep 17 00:00:00 2001 From: Tarry Singh Date: Fri, 31 May 2024 13:02:46 +0000 Subject: [PATCH] stablehlo: bump to head and use new dialect capi This drastically reduce the number of build steps (from 3589 to 2553 steps) --- MODULE.bazel | 4 +- mlir/dialects/BUILD.bazel | 2 +- .../llvm-raw/20250217.0-0e779ad/MODULE.bazel | 11 ++++ .../20250217.0-0e779ad/overlay/BUILD.bazel | 0 .../20250217.0-0e779ad/overlay/MODULE.bazel | 11 ++++ .../overlay/utils/bazel/extension.bzl | 28 ++++++++++ .../llvm-raw/20250217.0-0e779ad/source.json | 10 ++++ .../stablehlo/20250217.0-4598975/MODULE.bazel | 15 ++++++ .../20250217.0-4598975/overlay/MODULE.bazel | 15 ++++++ .../stablehlo/20250217.0-4598975/source.json | 8 +++ .../xla/20250204-0-6789523/MODULE.bazel | 2 +- .../20250204-0-6789523/overlay/MODULE.bazel | 2 +- .../xla/20250204-1-6789523/MODULE.bazel | 34 ++++++++++++ .../20250204-1-6789523/overlay/MODULE.bazel | 34 ++++++++++++ .../xla/20250204-1-6789523/overlay/tsl.bzl | 19 +++++++ .../20250204-1-6789523/overlay/workspace.bzl | 52 +++++++++++++++++++ .../0001-bazel-migration-to-bazel-8.0.1.patch | 41 +++++++++++++++ ...e-C-compliance-for-Profiler-Extensio.patch | 26 ++++++++++ .../xla/20250204-1-6789523/source.json | 15 ++++++ 19 files changed, 324 insertions(+), 5 deletions(-) create mode 100644 third_party/modules/llvm-raw/20250217.0-0e779ad/MODULE.bazel create mode 100644 third_party/modules/llvm-raw/20250217.0-0e779ad/overlay/BUILD.bazel create mode 100644 third_party/modules/llvm-raw/20250217.0-0e779ad/overlay/MODULE.bazel create mode 100644 third_party/modules/llvm-raw/20250217.0-0e779ad/overlay/utils/bazel/extension.bzl create mode 100644 third_party/modules/llvm-raw/20250217.0-0e779ad/source.json create mode 100644 third_party/modules/stablehlo/20250217.0-4598975/MODULE.bazel create mode 100644 third_party/modules/stablehlo/20250217.0-4598975/overlay/MODULE.bazel create mode 100644 third_party/modules/stablehlo/20250217.0-4598975/source.json create mode 100644 third_party/modules/xla/20250204-1-6789523/MODULE.bazel create mode 100644 third_party/modules/xla/20250204-1-6789523/overlay/MODULE.bazel create mode 100644 third_party/modules/xla/20250204-1-6789523/overlay/tsl.bzl create mode 100644 third_party/modules/xla/20250204-1-6789523/overlay/workspace.bzl create mode 100644 third_party/modules/xla/20250204-1-6789523/patches/0001-bazel-migration-to-bazel-8.0.1.patch create mode 100644 third_party/modules/xla/20250204-1-6789523/patches/0003-PJRT-C-API-Ensure-C-compliance-for-Profiler-Extensio.patch create mode 100644 third_party/modules/xla/20250204-1-6789523/source.json diff --git a/MODULE.bazel b/MODULE.bazel index 8b78ba0..c664ef1 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -10,7 +10,7 @@ bazel_dep(name = "aspect_rules_py", version = "1.3.1") bazel_dep(name = "bazel_skylib", version = "1.7.1") bazel_dep(name = "hermetic_cc_toolchain", version = "3.1.1") bazel_dep(name = "libxev", version = "20252401.0-31eed4e") -bazel_dep(name = "llvm-raw", version = "20250201.0-386af4a") +bazel_dep(name = "llvm-raw", version = "20250217.0-0e779ad") bazel_dep(name = "patchelf", version = "0.18.0") bazel_dep(name = "pcre2", version = "10.43") bazel_dep(name = "platforms", version = "0.0.11") @@ -23,7 +23,7 @@ bazel_dep(name = "rules_rust", version = "0.57.1") bazel_dep(name = "rules_uv", version = "0.53.0") bazel_dep(name = "rules_zig", version = "20240913.0-1957d05") bazel_dep(name = "sentencepiece", version = "20240618.0-d7ace0a") -bazel_dep(name = "stablehlo", version = "20250201.0-7775e3e") +bazel_dep(name = "stablehlo", version = "20250217.0-4598975") bazel_dep(name = "toolchains_protoc", version = "0.3.7") bazel_dep(name = "with_cfg.bzl", version = "0.8.0") bazel_dep(name = "xla", version = "20250204-0-6789523") diff --git a/mlir/dialects/BUILD.bazel b/mlir/dialects/BUILD.bazel index 847e60a..0a275d8 100644 --- a/mlir/dialects/BUILD.bazel +++ b/mlir/dialects/BUILD.bazel @@ -31,7 +31,7 @@ zig_library( deps = [ "//mlir", "//mlir:c", - "@stablehlo//:stablehlo_capi", + "@stablehlo//:stablehlo_dialect_capi", ], ) diff --git a/third_party/modules/llvm-raw/20250217.0-0e779ad/MODULE.bazel b/third_party/modules/llvm-raw/20250217.0-0e779ad/MODULE.bazel new file mode 100644 index 0000000..245f034 --- /dev/null +++ b/third_party/modules/llvm-raw/20250217.0-0e779ad/MODULE.bazel @@ -0,0 +1,11 @@ +module( + name = "llvm-raw", + version = "20250217.0-0e779ad", + compatibility_level = 1, +) + +bazel_dep(name = "bazel_skylib", version = "1.7.1") +bazel_dep(name = "platforms", version = "0.0.11") +bazel_dep(name = "zstd", version = "1.5.6", repo_name = "llvm_zstd") +bazel_dep(name = "zlib", version = "1.3.1.bcr.3", repo_name = "llvm_zlib") +bazel_dep(name = "rules_python", version = "0.29.0") diff --git a/third_party/modules/llvm-raw/20250217.0-0e779ad/overlay/BUILD.bazel b/third_party/modules/llvm-raw/20250217.0-0e779ad/overlay/BUILD.bazel new file mode 100644 index 0000000..e69de29 diff --git a/third_party/modules/llvm-raw/20250217.0-0e779ad/overlay/MODULE.bazel b/third_party/modules/llvm-raw/20250217.0-0e779ad/overlay/MODULE.bazel new file mode 100644 index 0000000..245f034 --- /dev/null +++ b/third_party/modules/llvm-raw/20250217.0-0e779ad/overlay/MODULE.bazel @@ -0,0 +1,11 @@ +module( + name = "llvm-raw", + version = "20250217.0-0e779ad", + compatibility_level = 1, +) + +bazel_dep(name = "bazel_skylib", version = "1.7.1") +bazel_dep(name = "platforms", version = "0.0.11") +bazel_dep(name = "zstd", version = "1.5.6", repo_name = "llvm_zstd") +bazel_dep(name = "zlib", version = "1.3.1.bcr.3", repo_name = "llvm_zlib") +bazel_dep(name = "rules_python", version = "0.29.0") diff --git a/third_party/modules/llvm-raw/20250217.0-0e779ad/overlay/utils/bazel/extension.bzl b/third_party/modules/llvm-raw/20250217.0-0e779ad/overlay/utils/bazel/extension.bzl new file mode 100644 index 0000000..f247ed4 --- /dev/null +++ b/third_party/modules/llvm-raw/20250217.0-0e779ad/overlay/utils/bazel/extension.bzl @@ -0,0 +1,28 @@ +load("//utils/bazel:configure.bzl", _llvm_configure = "llvm_configure") + +def _llvm_impl(mctx): + _targets = {} + for mod in mctx.modules: + for conf in mod.tags.configure: + for target in conf.targets: + _targets[target] = True + _llvm_configure( + name = "llvm-project", + targets = _targets.keys(), + ) + return mctx.extension_metadata( + reproducible = True, + root_module_direct_deps = "all", + root_module_direct_dev_deps = [], + ) + +llvm = module_extension( + implementation = _llvm_impl, + tag_classes = { + "configure": tag_class( + attrs = { + "targets": attr.string_list(mandatory = True), + }, + ), + }, +) diff --git a/third_party/modules/llvm-raw/20250217.0-0e779ad/source.json b/third_party/modules/llvm-raw/20250217.0-0e779ad/source.json new file mode 100644 index 0000000..6add20e --- /dev/null +++ b/third_party/modules/llvm-raw/20250217.0-0e779ad/source.json @@ -0,0 +1,10 @@ +{ + "strip_prefix": "llvm-project-0e779ad4998ef65907502101c5b82ede05ddfa4e", + "url": "https://github.com/llvm/llvm-project/archive/0e779ad4998ef65907502101c5b82ede05ddfa4e.tar.gz", + "integrity": "sha256-1cJWCy2c487XlRET8rXR6kKGZWePTcsfuHgOsSGcphU=", + "overlay": { + "BUILD.bazel": "", + "MODULE.bazel": "", + "utils/bazel/extension.bzl": "" + } +} diff --git a/third_party/modules/stablehlo/20250217.0-4598975/MODULE.bazel b/third_party/modules/stablehlo/20250217.0-4598975/MODULE.bazel new file mode 100644 index 0000000..8c46265 --- /dev/null +++ b/third_party/modules/stablehlo/20250217.0-4598975/MODULE.bazel @@ -0,0 +1,15 @@ +module( + name = "stablehlo", + version = "20250217.0-4598975", + compatibility_level = 1, +) + +bazel_dep(name = "bazel_skylib", version = "1.7.1") +bazel_dep(name = "rules_cc", version = "0.0.9") +bazel_dep(name = "llvm-raw", version = "20250217.0-0e779ad") + +llvm = use_extension("@llvm-raw//utils/bazel:extension.bzl", "llvm") +llvm.configure( + targets = ["AArch64", "X86", "NVPTX"], +) +use_repo(llvm, "llvm-project") diff --git a/third_party/modules/stablehlo/20250217.0-4598975/overlay/MODULE.bazel b/third_party/modules/stablehlo/20250217.0-4598975/overlay/MODULE.bazel new file mode 100644 index 0000000..8c46265 --- /dev/null +++ b/third_party/modules/stablehlo/20250217.0-4598975/overlay/MODULE.bazel @@ -0,0 +1,15 @@ +module( + name = "stablehlo", + version = "20250217.0-4598975", + compatibility_level = 1, +) + +bazel_dep(name = "bazel_skylib", version = "1.7.1") +bazel_dep(name = "rules_cc", version = "0.0.9") +bazel_dep(name = "llvm-raw", version = "20250217.0-0e779ad") + +llvm = use_extension("@llvm-raw//utils/bazel:extension.bzl", "llvm") +llvm.configure( + targets = ["AArch64", "X86", "NVPTX"], +) +use_repo(llvm, "llvm-project") diff --git a/third_party/modules/stablehlo/20250217.0-4598975/source.json b/third_party/modules/stablehlo/20250217.0-4598975/source.json new file mode 100644 index 0000000..5ebc4df --- /dev/null +++ b/third_party/modules/stablehlo/20250217.0-4598975/source.json @@ -0,0 +1,8 @@ +{ + "strip_prefix": "stablehlo-459897561d365ef97caba46984847f9184d472ec", + "url": "https://github.com/openxla/stablehlo/archive/459897561d365ef97caba46984847f9184d472ec.tar.gz", + "integrity": "sha256-J2KXzmX3uAJiwuMLl06n8dyb9l1TCzGZ62IULyAUcec", + "overlay": { + "MODULE.bazel": "" + } +} diff --git a/third_party/modules/xla/20250204-0-6789523/MODULE.bazel b/third_party/modules/xla/20250204-0-6789523/MODULE.bazel index 7d2ebfb..71268f9 100644 --- a/third_party/modules/xla/20250204-0-6789523/MODULE.bazel +++ b/third_party/modules/xla/20250204-0-6789523/MODULE.bazel @@ -17,7 +17,7 @@ bazel_dep(name = "zlib", version = "1.2.13") bazel_dep(name = "re2", version = "2024-07-02.bcr.1", repo_name = "com_googlesource_code_re2") bazel_dep(name = "rules_license", version = "0.0.8") -bazel_dep(name = "stablehlo", version = "20250201.0-7775e3e") +bazel_dep(name = "stablehlo", version = "20250217.0-4598975") tsl = use_extension("//:tsl.bzl", "tsl") use_repo(tsl, "tsl") diff --git a/third_party/modules/xla/20250204-0-6789523/overlay/MODULE.bazel b/third_party/modules/xla/20250204-0-6789523/overlay/MODULE.bazel index 7d2ebfb..71268f9 100644 --- a/third_party/modules/xla/20250204-0-6789523/overlay/MODULE.bazel +++ b/third_party/modules/xla/20250204-0-6789523/overlay/MODULE.bazel @@ -17,7 +17,7 @@ bazel_dep(name = "zlib", version = "1.2.13") bazel_dep(name = "re2", version = "2024-07-02.bcr.1", repo_name = "com_googlesource_code_re2") bazel_dep(name = "rules_license", version = "0.0.8") -bazel_dep(name = "stablehlo", version = "20250201.0-7775e3e") +bazel_dep(name = "stablehlo", version = "20250217.0-4598975") tsl = use_extension("//:tsl.bzl", "tsl") use_repo(tsl, "tsl") diff --git a/third_party/modules/xla/20250204-1-6789523/MODULE.bazel b/third_party/modules/xla/20250204-1-6789523/MODULE.bazel new file mode 100644 index 0000000..7d2ebfb --- /dev/null +++ b/third_party/modules/xla/20250204-1-6789523/MODULE.bazel @@ -0,0 +1,34 @@ +module( + name = "xla", + version = "20250204-0-6789523", + compatibility_level = 1, +) + +bazel_dep(name = "platforms", version = "0.0.8") +bazel_dep(name = "bazel_skylib", version = "1.5.0") +bazel_dep(name = "rules_cc", version = "0.0.17") +bazel_dep(name = "rules_apple", version = "3.17.0", repo_name = "build_bazel_rules_apple") +bazel_dep(name = "abseil-cpp", version = "20240116.0", repo_name = "com_google_absl") +bazel_dep(name = "rules_python", version = "0.29.0") +bazel_dep(name = "rules_proto", version = "6.0.0-rc1") +bazel_dep(name = "rules_java", version = "7.3.2") +bazel_dep(name = "rules_pkg", version = "0.9.1") +bazel_dep(name = "zlib", version = "1.2.13") +bazel_dep(name = "re2", version = "2024-07-02.bcr.1", repo_name = "com_googlesource_code_re2") +bazel_dep(name = "rules_license", version = "0.0.8") + +bazel_dep(name = "stablehlo", version = "20250201.0-7775e3e") + +tsl = use_extension("//:tsl.bzl", "tsl") +use_repo(tsl, "tsl") + +xla_workspace = use_extension("//:workspace.bzl", "xla_workspace") +use_repo( + xla_workspace, + "com_github_grpc_grpc", + "com_google_protobuf", + "local_config_cuda", + "local_config_remote_execution", + "local_config_rocm", + "local_config_tensorrt", +) diff --git a/third_party/modules/xla/20250204-1-6789523/overlay/MODULE.bazel b/third_party/modules/xla/20250204-1-6789523/overlay/MODULE.bazel new file mode 100644 index 0000000..7d2ebfb --- /dev/null +++ b/third_party/modules/xla/20250204-1-6789523/overlay/MODULE.bazel @@ -0,0 +1,34 @@ +module( + name = "xla", + version = "20250204-0-6789523", + compatibility_level = 1, +) + +bazel_dep(name = "platforms", version = "0.0.8") +bazel_dep(name = "bazel_skylib", version = "1.5.0") +bazel_dep(name = "rules_cc", version = "0.0.17") +bazel_dep(name = "rules_apple", version = "3.17.0", repo_name = "build_bazel_rules_apple") +bazel_dep(name = "abseil-cpp", version = "20240116.0", repo_name = "com_google_absl") +bazel_dep(name = "rules_python", version = "0.29.0") +bazel_dep(name = "rules_proto", version = "6.0.0-rc1") +bazel_dep(name = "rules_java", version = "7.3.2") +bazel_dep(name = "rules_pkg", version = "0.9.1") +bazel_dep(name = "zlib", version = "1.2.13") +bazel_dep(name = "re2", version = "2024-07-02.bcr.1", repo_name = "com_googlesource_code_re2") +bazel_dep(name = "rules_license", version = "0.0.8") + +bazel_dep(name = "stablehlo", version = "20250201.0-7775e3e") + +tsl = use_extension("//:tsl.bzl", "tsl") +use_repo(tsl, "tsl") + +xla_workspace = use_extension("//:workspace.bzl", "xla_workspace") +use_repo( + xla_workspace, + "com_github_grpc_grpc", + "com_google_protobuf", + "local_config_cuda", + "local_config_remote_execution", + "local_config_rocm", + "local_config_tensorrt", +) diff --git a/third_party/modules/xla/20250204-1-6789523/overlay/tsl.bzl b/third_party/modules/xla/20250204-1-6789523/overlay/tsl.bzl new file mode 100644 index 0000000..dc25c9d --- /dev/null +++ b/third_party/modules/xla/20250204-1-6789523/overlay/tsl.bzl @@ -0,0 +1,19 @@ +load("//third_party:repo.bzl", "tf_vendored") +load("//third_party/py:python_init_repositories.bzl", "python_init_repositories") + +def _tsl_impl(mctx): + python_init_repositories( + requirements = { + "3.11": "//:requirements_lock_3_11.txt", + }, + ) + tf_vendored(name = "tsl", relpath = "third_party/tsl") + return mctx.extension_metadata( + reproducible = True, + root_module_direct_deps = ["tsl"], + root_module_direct_dev_deps = [], + ) + +tsl = module_extension( + implementation = _tsl_impl, +) diff --git a/third_party/modules/xla/20250204-1-6789523/overlay/workspace.bzl b/third_party/modules/xla/20250204-1-6789523/overlay/workspace.bzl new file mode 100644 index 0000000..87c035b --- /dev/null +++ b/third_party/modules/xla/20250204-1-6789523/overlay/workspace.bzl @@ -0,0 +1,52 @@ +load("@tsl//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") +load("@tsl//third_party/gpus:cuda_configure.bzl", "cuda_configure") +load("@tsl//third_party/gpus:rocm_configure.bzl", "rocm_configure") +load("@tsl//third_party/tensorrt:tensorrt_configure.bzl", "tensorrt_configure") +load("@tsl//tools/toolchains/remote:configure.bzl", "remote_execution_configure") + +def _xla_workspace_impl(mctx): + cuda_configure(name = "local_config_cuda") + remote_execution_configure(name = "local_config_remote_execution") + rocm_configure(name = "local_config_rocm") + tensorrt_configure(name = "local_config_tensorrt") + tf_http_archive( + name = "com_github_grpc_grpc", + sha256 = "b956598d8cbe168b5ee717b5dafa56563eb5201a947856a6688bbeac9cac4e1f", + strip_prefix = "grpc-b54a5b338637f92bfcf4b0bc05e0f57a5fd8fadd", + system_build_file = "@tsl//third_party/systemlibs:grpc.BUILD", + patch_file = [ + "@tsl//third_party/grpc:generate_cc_env_fix.patch", + "@tsl//third_party/grpc:register_go_toolchain.patch", + ], + system_link_files = { + "@tsl//third_party/systemlibs:BUILD": "bazel/BUILD", + "@tsl//third_party/systemlibs:grpc.BUILD": "src/compiler/BUILD", + "@tsl//third_party/systemlibs:grpc.bazel.grpc_deps.bzl": "bazel/grpc_deps.bzl", + "@tsl//third_party/systemlibs:grpc.bazel.grpc_extra_deps.bzl": "bazel/grpc_extra_deps.bzl", + "@tsl//third_party/systemlibs:grpc.bazel.cc_grpc_library.bzl": "bazel/cc_grpc_library.bzl", + "@tsl//third_party/systemlibs:grpc.bazel.generate_cc.bzl": "bazel/generate_cc.bzl", + "@tsl//third_party/systemlibs:grpc.bazel.protobuf.bzl": "bazel/protobuf.bzl", + }, + urls = tf_mirror_urls("https://github.com/grpc/grpc/archive/b54a5b338637f92bfcf4b0bc05e0f57a5fd8fadd.tar.gz"), + ) + tf_http_archive( + name = "com_google_protobuf", + patch_file = ["@tsl//third_party/protobuf:protobuf.patch"], + sha256 = "f66073dee0bc159157b0bd7f502d7d1ee0bc76b3c1eac9836927511bdc4b3fc1", + strip_prefix = "protobuf-3.21.9", + system_build_file = "@tsl//third_party/systemlibs:protobuf.BUILD", + system_link_files = { + "@tsl//third_party/systemlibs:protobuf.bzl": "protobuf.bzl", + "@tsl//third_party/systemlibs:protobuf_deps.bzl": "protobuf_deps.bzl", + }, + urls = tf_mirror_urls("https://github.com/protocolbuffers/protobuf/archive/v3.21.9.zip"), + ) + return mctx.extension_metadata( + reproducible = True, + root_module_direct_deps = "all", + root_module_direct_dev_deps = [], + ) + +xla_workspace = module_extension( + implementation = _xla_workspace_impl, +) diff --git a/third_party/modules/xla/20250204-1-6789523/patches/0001-bazel-migration-to-bazel-8.0.1.patch b/third_party/modules/xla/20250204-1-6789523/patches/0001-bazel-migration-to-bazel-8.0.1.patch new file mode 100644 index 0000000..a29cbd9 --- /dev/null +++ b/third_party/modules/xla/20250204-1-6789523/patches/0001-bazel-migration-to-bazel-8.0.1.patch @@ -0,0 +1,41 @@ +From 6cf475b500521c1b8be06f590fdbc1818f0dc44b Mon Sep 17 00:00:00 2001 +From: Jean-Baptiste Dalido +Date: Mon, 6 Jan 2025 13:33:13 +0100 +Subject: [PATCH] bazel: migration to bazel 8.0.1 + +--- + .bazelversion | 2 +- + third_party/tsl/third_party/gpus/cuda_configure.bzl | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/.bazelversion b/.bazelversion +index f22d756da3..fa5fce04b3 100644 +--- a/.bazelversion ++++ b/.bazelversion +@@ -1 +1 @@ +-6.5.0 ++8.0.1 +\ No newline at end of file +diff --git a/third_party/tsl/third_party/gpus/cuda_configure.bzl b/third_party/tsl/third_party/gpus/cuda_configure.bzl +index d62531152d..71d80a5a99 100644 +--- a/third_party/tsl/third_party/gpus/cuda_configure.bzl ++++ b/third_party/tsl/third_party/gpus/cuda_configure.bzl +@@ -33,14 +33,14 @@ NB: DEPRECATED! Use `hermetic/cuda_configure` rule instead. + load( + "@bazel_tools//tools/cpp:lib_cc_configure.bzl", + "escape_string", +- "get_env_var", + ) + load( + "@bazel_tools//tools/cpp:windows_cc_configure.bzl", +- "find_msvc_tool", + "find_vc_path", + "setup_vc_env_vars", + ) ++load("@rules_cc//cc/private/toolchain:windows_cc_configure.bzl", "find_msvc_tool") ++load("@rules_cc//cc/private/toolchain:lib_cc_configure.bzl", "get_env_var") + load("//third_party/clang_toolchain:download_clang.bzl", "download_clang") + load( + "//third_party/remote_config:common.bzl", +-- +2.39.3 (Apple Git-146) diff --git a/third_party/modules/xla/20250204-1-6789523/patches/0003-PJRT-C-API-Ensure-C-compliance-for-Profiler-Extensio.patch b/third_party/modules/xla/20250204-1-6789523/patches/0003-PJRT-C-API-Ensure-C-compliance-for-Profiler-Extensio.patch new file mode 100644 index 0000000..4b6a65c --- /dev/null +++ b/third_party/modules/xla/20250204-1-6789523/patches/0003-PJRT-C-API-Ensure-C-compliance-for-Profiler-Extensio.patch @@ -0,0 +1,26 @@ +From 4db5de34f70d991fedbe28915c8239b97ba7a064 Mon Sep 17 00:00:00 2001 +From: Steeve Morin +Date: Mon, 18 Mar 2024 17:17:34 +0100 +Subject: [PATCH 3/3] [PJRT C API] Ensure C compliance for Profiler Extension + +--- + xla/pjrt/c/pjrt_c_api_profiler_extension.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/xla/pjrt/c/pjrt_c_api_profiler_extension.h b/xla/pjrt/c/pjrt_c_api_profiler_extension.h +index c821916ad..89a596123 100644 +--- a/xla/pjrt/c/pjrt_c_api_profiler_extension.h ++++ b/xla/pjrt/c/pjrt_c_api_profiler_extension.h +@@ -16,8 +16,10 @@ limitations under the License. + #ifndef XLA_PJRT_C_PJRT_C_API_PROFILER_EXTENSION_H_ + #define XLA_PJRT_C_PJRT_C_API_PROFILER_EXTENSION_H_ + ++#ifdef __cplusplus + #include + #include ++#endif + + #include "xla/backends/profiler/plugin/profiler_c_api.h" + #include "xla/pjrt/c/pjrt_c_api.h" +-- +2.39.3 (Apple Git-146) diff --git a/third_party/modules/xla/20250204-1-6789523/source.json b/third_party/modules/xla/20250204-1-6789523/source.json new file mode 100644 index 0000000..ab3abf7 --- /dev/null +++ b/third_party/modules/xla/20250204-1-6789523/source.json @@ -0,0 +1,15 @@ +{ + "strip_prefix": "xla-6789523d0a42c2cf83309a263f417122c4c63811", + "url": "https://github.com/openxla/xla/archive/6789523d0a42c2cf83309a263f417122c4c63811.tar.gz", + "integrity": "sha256-7z0MdXQBoGApSYpTvYjKFmg18tGkjJ3P/PPQ487cPc8=", + "overlay": { + "tsl.bzl": "", + "workspace.bzl": "", + "MODULE.bazel": "" + }, + "patch_strip": 1, + "patches": { + "0001-bazel-migration-to-bazel-8.0.1.patch": "", + "0003-PJRT-C-API-Ensure-C-compliance-for-Profiler-Extensio.patch": "" + } +}