Skip to content

Commit

Permalink
Upgrade MLIR with new IR print option (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackalcooper authored Nov 27, 2024
1 parent d298c34 commit 98f4295
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
mlir==20.0.0.2024102001+2deb3a26; sys_platform != "linux"
mlir==20.0.0.2024102001+cuda.2deb3a26; sys_platform == "linux"
mlir==20.0.0.2024112701+fad5ed6e; sys_platform != "linux"
mlir==20.0.0.2024112701+cuda.fad5ed6e; sys_platform == "linux"
--find-links https://github.com/makslevental/mlir-wheels/releases/expanded_assets/latest
4 changes: 3 additions & 1 deletion lib/beaver/mlir/pass_manager.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ defmodule Beaver.MLIR.PassManager do
| {:module_scope, boolean()}
| {:after_only_on_change, boolean()}
| {:after_only_on_failure, boolean()}
| {:tree_printing_path, String.t()}
@type print_opts :: [print_opt()]
@spec enable_ir_printing(MLIR.PassManager.t(), print_opts()) :: :ok
def enable_ir_printing(%MLIR.PassManager{} = pm, opts \\ []) do
Expand All @@ -21,7 +22,8 @@ defmodule Beaver.MLIR.PassManager do
!!Keyword.get(opts, :after_all, true),
!!Keyword.get(opts, :module_scope, false),
!!Keyword.get(opts, :after_only_on_change, false),
!!Keyword.get(opts, :after_only_on_failure, false)
!!Keyword.get(opts, :after_only_on_failure, false),
MLIR.StringRef.create(Keyword.get(opts, :tree_printing_path, ""))
)
end
end
2 changes: 1 addition & 1 deletion test/memref_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ defmodule MemRefTest do
|> Beaver.Composer.append("one-shot-bufferize")
|> Beaver.Composer.nested(
"func.func",
~w{finalizing-bufferize buffer-deallocation convert-linalg-to-loops}
~w{buffer-deallocation convert-linalg-to-loops}
)
|> convert_scf_to_cf
|> Beaver.Composer.append("finalize-memref-to-llvm")
Expand Down

0 comments on commit 98f4295

Please sign in to comment.