Skip to content

feat: jll changes for mhlo/xla passes #1464

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/CI-localjll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ jobs:
env:
TMPDIR: ${{ github.workspace }}/tmp
steps:
- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
- name: Clean `/opt`
run: sudo rm -rf /opt/*
- uses: actions/checkout@v4
- name: Create TMPDIR
run: |
Expand Down
8 changes: 8 additions & 0 deletions deps/ReactantExtra/API.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
#include "xla/pjrt/plugin/xla_cpu/xla_cpu_pjrt_client.h"

#include "xla/hlo/translate/hlo_to_mhlo/hlo_utils.h"
#include "xla/hlo/translate/stablehlo.h"

// CPU collectives
#include "xla/backends/cpu/collectives/mpi_collectives.h"
Expand Down Expand Up @@ -2941,3 +2942,10 @@ extern "C" void reactantXLAExec(LinkableRuntime **__restrict__ lrtP,
}
}
}

extern "C" HeldHloModule *convertMlirModuleToHloModule(MlirModule mod) {
mlir::ModuleOp cmod_op = cast<ModuleOp>(*unwrap(mod));
std::shared_ptr<xla::HloModule> hlo_module =
std::move(MyValueOrThrow(xla::ConvertStablehloToHlo(cmod_op)));
return reactant::capture(hlo_module);
}
2 changes: 2 additions & 0 deletions deps/ReactantExtra/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,7 @@ cc_library(
"-Wl,-exported_symbol,_addSdyPropagationPipeline",
"-Wl,-exported_symbol,_mlirGetFunctionTypeFromOperation",
"-Wl,-exported_symbol,_mlirIsFunctionOpInterface",
"-Wl,-exported_symbol,_convertMlirModuleToHloModule",
],
}),
linkstatic = True,
Expand Down Expand Up @@ -960,6 +961,7 @@ cc_library(
"@xla//xla/pjrt:status_casters",
"@xla//xla/python/ifrt",
"@xla//xla/python/pjrt_ifrt",
"@xla//xla/hlo/translate:stablehlo",
"@xla//xla/python/ifrt_proxy/server:grpc_server",
"@xla//xla/python/ifrt_proxy/client:grpc_client",
"@xla//xla/python/ifrt_proxy/client:registry",
Expand Down
2 changes: 1 addition & 1 deletion deps/ReactantExtra/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ http_archive(
urls = ["https://github.com/wsmoses/nsync/archive/{commit}.tar.gz".format(commit = NSYNC_COMMIT)],
)

ENZYMEXLA_COMMIT = "85adc0201b0e605ce1bc89cf235ac0bfc23e77ab"
ENZYMEXLA_COMMIT = "6774f1afb90c377bbf234a7a7dbfab4f7b726481"

ENZYMEXLA_SHA256 = ""

Expand Down
Loading