Skip to content
Open
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
5 changes: 4 additions & 1 deletion test/Conversion/tritongpu_to_llvm.mlir
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// RUN: triton-opt %s -split-input-file --allocate-shared-memory-nv --convert-triton-gpu-to-llvm 2>/dev/null | FileCheck %s --dump-input-context 20
// RUN: triton-opt %s -split-input-file \
// RUN: --allocate-shared-memory-nv --convert-triton-gpu-to-llvm \
// RUN: --reconcile-unrealized-casts 2>/dev/null \
Copy link
Collaborator

Choose a reason for hiding this comment

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

we have quite a few tests that call --convert-triton-gpu-to-llvm why changing this is one in particular?
We are not calling this pass in our python pass manager so either is is unnecessary or we may have some problems? Or is it just getting fixed by canonicalizer?
I wonder if we should just make sure we reconcile unrealized casts at the end of our conversion passes instead

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, probably they are being cleaned up by some canonicalization and/or DCE pass or similar. It could also be that some test allow for additional ops because they use CHECK and not CHECK-NEXT. Finally, downstream users and tests may not have updated to that version of LLVM yet.

In any case, yes, making the reconciliation part of the conversions may be a good way to ensure that that always happens. Maybe it's also something to ask or discuss upstream; sounds cumbersome if everybody needs to do this now...

Copy link
Collaborator

Choose a reason for hiding this comment

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

is this change driven by a concrete case breaking with top of tree llvm?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, exactly. It breaks with the change linked in the PR description.

// RUN: | FileCheck %s --dump-input-context 20

module attributes {"ttg.num-ctas" = 1 : i32, "ttg.num-warps" = 4 : i32} {
// CHECK: llvm.func @test_empty_kernel(%arg0: i32, %arg1: !llvm.ptr<1>, %arg2: !llvm.ptr<1>, %arg3: !llvm.ptr<1>)
Expand Down
Loading