-
Notifications
You must be signed in to change notification settings - Fork 641
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
Integrate LLVM at llvm/llvm-project@f7b2c2e4 #18143
Conversation
Signed-off-by: hanhanW <[email protected]>
Abbreviated Benchmark Summary@ commit 473cbe7ec997040d4419af91d44835c757b65e67 (vs. base 4716f685cd74b09d85ec8b3ee515d6dcb72b8e2c) Data-Tiling Comparison TableClick to show
No improved or regressed benchmarks 🏖️ No improved or regressed compilation metrics 🏖️ For more information: |
Signed-off-by: hanhanW <[email protected]>
// CHECK: ^bb2 | ||
^bb2(%bb2_0: !stream.resource<*>, %bb2_1: !stream.resource<*>): | ||
// CHECK-NOT: stream.async.transfer | ||
%external_transfer = stream.async.transfer %bb2_1 : !stream.resource<*>{%size} -> !stream.resource<external>{%size} | ||
// CHECK: util.return %[[BB2_ARG_FILL0]], %[[BB2_ARG_SELECT]] : !stream.resource<transient>, !stream.resource<external> | ||
// CHECK: util.return %[[FILL0]], %[[SELECT]] : !stream.resource<transient>, !stream.resource<external> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirmed that llvm/llvm-project@441b672 breaks the test. The new output looks okay to me..
Input IR:
util.func private @propagateBlocks(%cond: i1, %size: index) -> (!stream.resource<*>, !stream.resource<external>) {
%c0 = arith.constant 0 : index
%c128 = arith.constant 128 : index
%c123_i32 = arith.constant 123 : i32
%c456_i32 = arith.constant 456 : i32
%splat0 = stream.async.splat %c123_i32 : i32 -> !stream.resource<*>{%size}
%splat1 = stream.async.splat %c456_i32 : i32 -> !stream.resource<*>{%size}
cf.br ^bb1(%splat0, %splat1 : !stream.resource<*>, !stream.resource<*>)
^bb1(%bb1_0: !stream.resource<*>, %bb1_1: !stream.resource<*>):
%clone0 = stream.async.clone %bb1_0 : !stream.resource<*>{%size} -> !stream.resource<*>{%size}
%fill0 = stream.async.fill %c123_i32, %clone0[%c0 to %c128 for %c128] : i32 -> !stream.resource<*>{%size}
%clone1 = stream.async.clone %bb1_1 : !stream.resource<*>{%size} -> !stream.resource<*>{%size}
%fill1 = stream.async.fill %c456_i32, %clone1[%c0 to %c128 for %c128] : i32 -> !stream.resource<*>{%size}
%bb1_1_new = arith.select %cond, %splat1, %fill1 : !stream.resource<*>
cf.cond_br %cond, ^bb1(%fill0, %bb1_1_new : !stream.resource<*>, !stream.resource<*>),
^bb2(%fill0, %bb1_1_new : !stream.resource<*>, !stream.resource<*>)
^bb2(%bb2_0: !stream.resource<*>, %bb2_1: !stream.resource<*>):
%external_transfer = stream.async.transfer %bb2_1 : !stream.resource<*>{%size} -> !stream.resource<external>{%size}
util.return %bb2_0, %external_transfer : !stream.resource<*>, !stream.resource<external>
}
The original output:
util.func private @propagateBlocks(%arg0: i1, %arg1: index) -> (!stream.resource<transient>, !stream.resource<external>) {
%c0 = arith.constant 0 : index
%c128 = arith.constant 128 : index
%c123_i32 = arith.constant 123 : i32
%c456_i32 = arith.constant 456 : i32
%0 = stream.async.splat %c123_i32 : i32 -> !stream.resource<transient>{%arg1}
%1 = stream.async.splat %c456_i32 : i32 -> !stream.resource<external>{%arg1}
cf.br ^bb1(%0, %1 : !stream.resource<transient>, !stream.resource<external>)
^bb1(%2: !stream.resource<transient>, %3: !stream.resource<external>): // 2 preds: ^bb0, ^bb1
%4 = stream.async.clone %2 : !stream.resource<transient>{%arg1} -> !stream.resource<transient>{%arg1}
%5 = stream.async.fill %c123_i32, %4[%c0 to %c128 for %c128] : i32 -> %4 as !stream.resource<transient>{%arg1}
%6 = stream.async.clone %3 : !stream.resource<external>{%arg1} -> !stream.resource<external>{%arg1}
%7 = stream.async.fill %c456_i32, %6[%c0 to %c128 for %c128] : i32 -> %6 as !stream.resource<external>{%arg1}
%8 = arith.select %arg0, %1, %7 : !stream.resource<external>
cf.cond_br %arg0, ^bb1(%5, %8 : !stream.resource<transient>, !stream.resource<external>), ^bb2(%5, %8 : !stream.resource<transient>, !stream.resource<external>)
^bb2(%9: !stream.resource<transient>, %10: !stream.resource<external>): // pred: ^bb1
util.return %9, %10 : !stream.resource<transient>, !stream.resource<external>
}
New output:
util.func private @propagateBlocks(%arg0: i1, %arg1: index) -> (!stream.resource<transient>, !stream.resource<external>) {
%c0 = arith.constant 0 : index
%c128 = arith.constant 128 : index
%c123_i32 = arith.constant 123 : i32
%c456_i32 = arith.constant 456 : i32
%0 = stream.async.splat %c123_i32 : i32 -> !stream.resource<transient>{%arg1}
%1 = stream.async.splat %c456_i32 : i32 -> !stream.resource<external>{%arg1}
cf.br ^bb1(%0, %1 : !stream.resource<transient>, !stream.resource<external>)
^bb1(%2: !stream.resource<transient>, %3: !stream.resource<external>): // 2 preds: ^bb0, ^bb1
%4 = stream.async.clone %2 : !stream.resource<transient>{%arg1} -> !stream.resource<transient>{%arg1}
%5 = stream.async.fill %c123_i32, %4[%c0 to %c128 for %c128] : i32 -> %4 as !stream.resource<transient>{%arg1}
%6 = stream.async.clone %3 : !stream.resource<external>{%arg1} -> !stream.resource<external>{%arg1}
%7 = stream.async.fill %c456_i32, %6[%c0 to %c128 for %c128] : i32 -> %6 as !stream.resource<external>{%arg1}
%8 = arith.select %arg0, %1, %7 : !stream.resource<external>
cf.cond_br %arg0, ^bb1(%5, %8 : !stream.resource<transient>, !stream.resource<external>), ^bb2
^bb2: // pred: ^bb1
util.return %5, %8 : !stream.resource<transient>, !stream.resource<external>
}
I think we can drop the bb2 arguments in this case. @benvanik does the fix make sense?
SGTM! |
W7900 job failed because of #18140. The integrate PR itself is good, I'm landing it. |
No description provided.