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

[AMDAIESinkIntoCore] Generalize sinking for reuse with other regioned ops #1117

Merged
merged 2 commits into from
Feb 20, 2025

Conversation

newling
Copy link
Contributor

@newling newling commented Feb 19, 2025

This is part of the PR to vectorize linalg.fill: #1095

Basically one of the patterns introduced in #1095 means that in one of the subsequent passes (lowering to llvm dialect) a cast operation is introduced outside of an aie.core, which needs to be inside the aie.core for core-to-standard to work. i.e. we need to sink an operation into an aie.core. Before this PR, there is already a pass to sink operations into amdaie.core. This PR refactors that pass so that it can be reused to sink into aie.core (or any other regioned op).

Copy link
Collaborator

@jtuyls jtuyls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one nit below.

// Replace uses of the dependency op inside the block. Specifically,
// if `use` is in `block` then replace its operand with `sunkOp`.
auto isInBlock = [&block](OpOperand &use) {
auto op = use.getOwner();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
auto op = use.getOwner();
Operation *op = use.getOwner();

@newling newling enabled auto-merge (squash) February 20, 2025 15:00
@newling newling merged commit 22f6ad0 into nod-ai:main Feb 20, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants