-
Notifications
You must be signed in to change notification settings - Fork 611
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@7752fec6 #18177
Conversation
Signed-off-by: hanhanW <hanhan0912@gmail.com>
Abbreviated Benchmark Summary@ commit a7057b33695a46ea551c12173d37e9f4bf451106 (vs. base 5a48912c52f65ead960bec9bfde5a836d1b02ab2) Data-Tiling Comparison TableClick to show
No improved or regressed benchmarks 🏖️ No improved or regressed compilation metrics 🏖️ For more information: |
Signed-off-by: hanhanW <hanhan0912@gmail.com>
It looks a LLVM failure.. looking |
Signed-off-by: hanhanW <hanhan0912@gmail.com>
Confirmed that llvm/llvm-project#102198 is the issue locally. I'll try to create a repro and signal it in upstream. |
To repro it in IREE: func.func private @generate_2D_source(%height : index, %width : index) -> tensor<?x?xi32> {
%init_source = tensor.empty(%height, %width) : tensor<?x?xi32>
%source = linalg.generic {
indexing_maps = [affine_map<(d0, d1) -> (d0, d1)>],
iterator_types = ["parallel", "parallel"]}
outs(%init_source : tensor<?x?xi32>) {
^bb0(%b0 : i32):
%outer = linalg.index 0 : index
%inner = linalg.index 1 : index
%strided = arith.muli %outer, %width : index
%linearized = arith.addi %inner, %strided : index
%linearized_i32 = arith.index_cast %linearized : index to i32
linalg.yield %linearized_i32 : i32
} -> tensor<?x?xi32>
// This blocks the fusion for inputs and testing ops.
%0 = util.optimization_barrier %source : tensor<?x?xi32>
%1 = flow.tensor.tie_shape %0 : tensor<?x?xi32>{%height, %width}
return %1 : tensor<?x?xi32>
}
func.func @static_pack_pad_transpose_outer_dims_large() {
%height = arith.constant 100 : index
%width = arith.constant 250 : index
%0 = call @generate_2D_source(%height, %width) : (index, index) -> tensor<?x?xi32>
%source = tensor.cast %0 : tensor<?x?xi32> to tensor<100x250xi32>
%padding_value = arith.constant 42 : i32
%init_pack = tensor.empty() : tensor<16x4x32x16xi32>
%pack = tensor.pack %source padding_value(%padding_value : i32)
outer_dims_perm = [1, 0] inner_dims_pos = [0, 1] inner_tiles = [32, 16] into %init_pack
: tensor<100x250xi32> -> tensor<16x4x32x16xi32>
%pad = tensor.pad %source low[0, 0] high[28, 6] {
^bb0(%b0 : index, %b1 : index):
tensor.yield %padding_value : i32
} : tensor<100x250xi32> to tensor<128x256xi32>
%reshape = tensor.expand_shape %pad [[0, 1], [2, 3]] output_shape [4, 32, 16, 16] : tensor<128x256xi32> into tensor<4x32x16x16xi32>
%init_transpose = tensor.empty() : tensor<16x4x32x16xi32>
%transpose = linalg.transpose
ins(%reshape : tensor<4x32x16x16xi32>)
outs(%init_transpose : tensor<16x4x32x16xi32>)
permutation = [2, 0, 1, 3]
check.expect_eq(%pack, %transpose) : tensor<16x4x32x16xi32>
return
} |
Here is the LLVM module before translate it to ISA: https://gist.github.com/hanhanW/b806883680dd028ed82943b84483c2b8 And it failed in
which calls iree/compiler/plugins/target/ROCM/ROCMTarget.cpp Lines 191 to 203 in 5a48912
@MaheshRavishankar @kuhar how do we reproduce the failure using LLVM tools? I think we can ask for a revert if we can provide such repro to the author. |
Revert commits: