Skip to content

Commit 66c200b

Browse files
authored
feat: jll changes for mhlo/xla passes (#1464)
* feat: jll changes for mhlo/xla passes * ci: free disk space * Update .github/workflows/CI-localjll.yml
1 parent 17130b7 commit 66c200b

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed

.github/workflows/CI-localjll.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ jobs:
3939
env:
4040
TMPDIR: ${{ github.workspace }}/tmp
4141
steps:
42+
- name: Free Disk Space
43+
uses: jlumbroso/free-disk-space@main
44+
with:
45+
tool-cache: false
46+
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
47+
- name: Clean `/opt`
48+
run: sudo rm -rf /opt/*
4249
- uses: actions/checkout@v4
4350
- name: Create TMPDIR
4451
run: |

deps/ReactantExtra/API.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
#include "xla/pjrt/plugin/xla_cpu/xla_cpu_pjrt_client.h"
8282

8383
#include "xla/hlo/translate/hlo_to_mhlo/hlo_utils.h"
84+
#include "xla/hlo/translate/stablehlo.h"
8485

8586
// CPU collectives
8687
#include "xla/backends/cpu/collectives/mpi_collectives.h"
@@ -2941,3 +2942,10 @@ extern "C" void reactantXLAExec(LinkableRuntime **__restrict__ lrtP,
29412942
}
29422943
}
29432944
}
2945+
2946+
extern "C" HeldHloModule *convertMlirModuleToHloModule(MlirModule mod) {
2947+
mlir::ModuleOp cmod_op = cast<ModuleOp>(*unwrap(mod));
2948+
std::shared_ptr<xla::HloModule> hlo_module =
2949+
std::move(MyValueOrThrow(xla::ConvertStablehloToHlo(cmod_op)));
2950+
return reactant::capture(hlo_module);
2951+
}

deps/ReactantExtra/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,7 @@ cc_library(
890890
"-Wl,-exported_symbol,_addSdyPropagationPipeline",
891891
"-Wl,-exported_symbol,_mlirGetFunctionTypeFromOperation",
892892
"-Wl,-exported_symbol,_mlirIsFunctionOpInterface",
893+
"-Wl,-exported_symbol,_convertMlirModuleToHloModule",
893894
],
894895
}),
895896
linkstatic = True,
@@ -960,6 +961,7 @@ cc_library(
960961
"@xla//xla/pjrt:status_casters",
961962
"@xla//xla/python/ifrt",
962963
"@xla//xla/python/pjrt_ifrt",
964+
"@xla//xla/hlo/translate:stablehlo",
963965
"@xla//xla/python/ifrt_proxy/server:grpc_server",
964966
"@xla//xla/python/ifrt_proxy/client:grpc_client",
965967
"@xla//xla/python/ifrt_proxy/client:registry",

deps/ReactantExtra/WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ http_archive(
1111
urls = ["https://github.com/wsmoses/nsync/archive/{commit}.tar.gz".format(commit = NSYNC_COMMIT)],
1212
)
1313

14-
ENZYMEXLA_COMMIT = "85adc0201b0e605ce1bc89cf235ac0bfc23e77ab"
14+
ENZYMEXLA_COMMIT = "6774f1afb90c377bbf234a7a7dbfab4f7b726481"
1515

1616
ENZYMEXLA_SHA256 = ""
1717

0 commit comments

Comments
 (0)