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

[MLIR] Mark scatter pass as depending on func dialect #1216

Merged
merged 3 commits into from
Oct 18, 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
3 changes: 3 additions & 0 deletions doc/releases/changelog-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,9 @@
* Fixes taking gradient of nested accelerate callbacks.
[(#1156)](https://github.com/PennyLaneAI/catalyst/pull/1156)

* Registers the func dialect as a requirement for running the scatter lowering pass.
[(#1216)](https://github.com/PennyLaneAI/catalyst/pull/1216)

<h3>Internal changes</h3>

* Remove deprecated pennylane code across the frontend.
Expand Down
1 change: 1 addition & 0 deletions mlir/include/Catalyst/Transforms/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def ScatterLoweringPass : Pass<"scatter-lowering"> {
let summary = "Lower scatter op from Stable HLO to loops.";

let dependentDialects = [
"mlir::func::FuncDialect",
"index::IndexDialect",
"mhlo::MhloDialect",
"scf::SCFDialect"
Expand Down
3 changes: 2 additions & 1 deletion mlir/lib/Catalyst/Transforms/scatter_lowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "mhlo/IR/hlo_ops.h"
#include "mhlo/transforms/passes.h"

#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/Index/IR/IndexDialect.h"
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/Pass/Pass.h"
Expand Down Expand Up @@ -57,4 +58,4 @@ std::unique_ptr<Pass> createScatterLoweringPass()
return std::make_unique<ScatterLoweringPass>();
}

} // namespace catalyst
} // namespace catalyst
Loading