Skip to content

Integrate llvm-project @864902e9b4d8bc6d3f0852d5c475e3dc97dd8335 - #18843

Merged
Max191 merged 3 commits into
mainfrom
integrates/llvm-20241018_1
Oct 21, 2024
Merged

Max191 merged 3 commits into
mainfrom
integrates/llvm-20241018_1

Conversation

@Max191

@Max191 Max191 commented Oct 19, 2024 •

Copy link
Copy Markdown
Contributor

bump llvm-project to llvm/llvm-project@864902e

Main changes in IREE (causing test updates):

  • New forall loop canonicalizations are added which fold induction variables. This can canonicalilze away some index computation, and fold some extract_slice ops, so a few pipeline tests are changed.
  • A new option for hoistRedundantVectorTransfers (verifyNonZeroTrip) is set, which prevents hoisting from possibly zero trip loops. This option is flipped in this integrate because it fixes a bug exposed by forall loop canonicalizations.

@kuhar kuhar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How does the performance look like after this integrate?

loopInvariantCodeMotion(funcOp);
linalg::hoistRedundantVectorTransfers(cast<func::FuncOp>(funcOp));
linalg::hoistRedundantVectorTransfers(cast<func::FuncOp>(funcOp),
/*verifyNonZeroTrip=*/true);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can make this false for the integrate which keeps the same behavior in the integrate commit. Then you can send another patch to enable this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The issue is that this test fails after the loop canonicalization patch that comes in from this integrate:

// Verify that the write does not get hoisted out of the single threaded
// for loop.
// CHECK: vector.transfer_write %{{.*}}, %[[B2]]{{.*}} memref<10x1xf32, #hal.descriptor_type<storage_buffer>>
// CHECK-NEXT: }
// CHECK-NEXT: return

I added the verifyNonZeroTrip option upstream to handle this case along with the loop canonicalizations.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh I see, there are other changes already break the tests and the change here fixes the issue.

@Max191

Max191 commented Oct 21, 2024

Copy link
Copy Markdown
Contributor Author

How does the performance look like after this integrate?

Based on the CI, all the SDXL numbers are down from their golden numbers (e2e ~370ms->340ms). I'm not sure if these golden numbers are up to date, though.

@Max191
Max191 marked this pull request as ready for review October 21, 2024 14:43
@Max191
Max191 requested review from hanhanW and kuhar October 21, 2024 15:11
@Max191
Max191 merged commit d0269f3 into main Oct 21, 2024
@Max191
Max191 deleted the integrates/llvm-20241018_1 branch October 21, 2024 23:03
Eliasj42 pushed a commit that referenced this pull request Oct 31, 2024
)

bump llvm-project to
llvm/llvm-project@864902e

Main changes in IREE (causing test updates):
- New forall loop canonicalizations are added which fold induction
variables. This can canonicalilze away some index computation, and fold
some extract_slice ops, so a few pipeline tests are changed.
- A new option for `hoistRedundantVectorTransfers` (`verifyNonZeroTrip`)
is set, which prevents hoisting from possibly zero trip loops. This
option is flipped in this integrate because it fixes a bug exposed by
forall loop canonicalizations.

---------

Signed-off-by: Max Dawkins <[email protected]>
Signed-off-by: Elias Joseph <[email protected]>
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.

3 participants