Skip to content

Commit

Permalink
Use jit_apply in to_mlir_module
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Aug 13, 2024
1 parent 03d7f87 commit e6439da
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions exla/lib/exla.ex
Original file line number Diff line number Diff line change
Expand Up @@ -381,12 +381,12 @@ defmodule EXLA do
throw({:mlir_module, executable.ref})
end

function
|> jit([
opts = [
{EXLA, {&EXLA.Defn.LockedCache.run/2, comp_fun}},
{:module_compilation, :to_mlir} | options
])
|> apply(args)
]

jit_apply(function, args, opts)
catch
{:mlir_module, ref} ->
EXLA.MLIR.Module.as_string(%EXLA.MLIR.Module{ref: ref})
Expand Down

0 comments on commit e6439da

Please sign in to comment.