Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade MLIR with new IR print option #372

Merged
merged 2 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()}
jackalcooper marked this conversation as resolved.
Show resolved Hide resolved
@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