Skip to content

Commit 1563988

Browse files
committed
Refactor module debugging
1 parent 741829f commit 1563988

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

exla/lib/exla/mlir/module.ex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ defmodule EXLA.MLIR.Module do
9898
do: -1,
9999
else: Keyword.get(options, :device_id, client.default_device_id)
100100

101-
# module.ref |> EXLA.NIF.mlir_module_to_string() |> elem(1) |> IO.puts()
101+
# Uncomment to debug the module MLIR source
102+
# module |> as_string() |> IO.puts()
102103

103104
ref =
104105
EXLA.NIF.mlir_compile(
@@ -126,7 +127,7 @@ defmodule EXLA.MLIR.Module do
126127
Returns a human-readable representation of the module using MLIR
127128
syntax.
128129
"""
129-
def to_string(module = %__MODULE__{}) do
130+
def as_string(module = %__MODULE__{}) do
130131
EXLA.NIF.mlir_module_to_string(module.ref) |> unwrap!()
131132
end
132133

0 commit comments

Comments
 (0)