File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1189,13 +1189,22 @@ function compile_mlir!(
1189
1189
# Add a `donated` attr to the function arguments. This doesn't affect XLA, but lets us
1190
1190
# check which arguments were donated.
1191
1191
preserved_args_idx = last .(preserved_args)
1192
+ if backend != " tpu"
1192
1193
for (i, arg) in enumerate (linear_args)
1193
1194
if i ∉ preserved_args_idx
1194
1195
MLIR. API. mlirFuncSetArgAttr (
1195
1196
func3, i - 1 , " reactant.donated" , MLIR. IR. UnitAttribute ()
1196
1197
)
1197
1198
end
1198
1199
end
1200
+ else
1201
+ for op in collect (MLIR. IR. OperationIterator (MLIR. IR. body (mod)))
1202
+ if MLIR. IR. dialect (op) == :llvm
1203
+ MLIR. API. mlirOperationDestroy (op. operation)
1204
+ op. operation = MLIR. API. MlirOperation (C_NULL )
1205
+ end
1206
+ end
1207
+ end
1199
1208
1200
1209
return Reactant. TracedUtils. CompiledMlirFnResult (
1201
1210
fnwrapped,
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ function download_libtpu_if_needed(path=nothing)
38
38
@assert path != = nothing " libtpu_dir is not set!"
39
39
if ! isfile (path * " /libtpu.so" )
40
40
Downloads. download (
41
- " https://storage.googleapis.com/libtpu-nightly-releases/wheels/libtpu-nightly/libtpu_nightly-0.1.dev20250313 +nightly-py3-none-manylinux_2_31_x86_64.whl" ,
41
+ " https://storage.googleapis.com/libtpu-nightly-releases/wheels/libtpu-nightly/libtpu_nightly-0.1.dev20250326 +nightly-py3-none-manylinux_2_31_x86_64.whl" ,
42
42
path * " /tpu.zip" ,
43
43
)
44
44
run (` unzip -qq $(path* " /tpu.zip" ) -d $(path) /tmp` )
You can’t perform that action at this time.
0 commit comments