Skip to content

Commit dab3146

Browse files
authored
Integrate LLVM at 92c55a3 (#21429)
Integrate llvm/llvm-project@92c55a3. Local changes adapt to llvm/llvm-project@03bd0f3, plus a fix to a preexisting issue in `vmvx_materialize_encoding.mlir` which for some reason was tolerated up until now. No reverts or cherry-picks: dropped the former local revert since llvm/llvm-project#149393 was landed. --------- Signed-off-by: Benoit Jacob <[email protected]>
1 parent d17d103 commit dab3146

File tree

5 files changed

+11
-13
lines changed

5 files changed

+11
-13
lines changed

compiler/src/iree/compiler/Codegen/Common/ConvertBf16ArithToF32.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,8 @@ struct ConvertBf16ArithToF32Pass final
285285
// Some arithmetic operations exist in the vector dialect.
286286
target.addDynamicallyLegalOp<vector::FMAOp, vector::ReductionOp,
287287
vector::MultiDimReductionOp, vector::MaskOp,
288-
vector::MatmulOp, vector::OuterProductOp,
289-
vector::YieldOp>(checkOp);
288+
vector::OuterProductOp, vector::YieldOp>(
289+
checkOp);
290290

291291
// Some ops are always legal.
292292
target.addLegalOp<arith::BitcastOp>();

compiler/src/iree/compiler/Codegen/Common/ConvertBf16ToUInt16Buffers.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,12 @@ struct ConvertBf16ToUInt16BuffersPass final
320320
vector::GatherOp, vector::ScatterOp, vector::ExpandLoadOp,
321321
vector::CompressStoreOp, vector::ShapeCastOp, vector::ConstantMaskOp,
322322
vector::CreateMaskOp, vector::MaskOp, vector::TransposeOp,
323-
vector::FlatTransposeOp, vector::SplatOp, vector::YieldOp>(
324-
[&typeConverter](Operation *op) {
325-
bool legal = typeConverter.isLegal(op);
326-
LLVM_DEBUG(if (!legal) llvm::dbgs()
327-
<< "Bf16Emulation: illegal op: " << *op << "\n");
328-
return legal;
329-
});
323+
vector::SplatOp, vector::YieldOp>([&typeConverter](Operation *op) {
324+
bool legal = typeConverter.isLegal(op);
325+
LLVM_DEBUG(if (!legal) llvm::dbgs()
326+
<< "Bf16Emulation: illegal op: " << *op << "\n");
327+
return legal;
328+
});
330329

331330
RewritePatternSet patterns(ctx);
332331
populateIreeBf16EmulationPatterns(patterns, typeConverter);

compiler/src/iree/compiler/Codegen/Common/test/vmvx_materialize_encoding.mlir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,15 @@ func.func @matmul_lowering_i8i8i32_vmvx_ukernel() attributes {
9797
#encoding_lhs = #iree_encoding.encoding<operand_index = 0, op_type = matmul, element_types = [f32, f32, f32], user_indexing_maps = [#map2, #map3, #map4], iteration_sizes = [1, 3, 2]>
9898
#encoding_rhs = #iree_encoding.encoding<operand_index = 1, op_type = matmul, element_types = [f32, f32, f32], user_indexing_maps = [#map2, #map3, #map4], iteration_sizes = [1, 3, 2]>
9999
#encoding_result = #iree_encoding.encoding<operand_index = 2, op_type = matmul, element_types = [f32, f32, f32], user_indexing_maps = [#map2, #map3, #map4], iteration_sizes = [1, 3, 2]>
100-
func.func @fill_matmul(%arg0: index, %arg1: index, %arg2: index, %arg3: index, %arg4: index, %arg5: index, %arg6: index, %arg7: index) attributes {
100+
func.func @fill_matmul() attributes {
101101
hal.executable.target = #hal.executable.target<"vmvx", "vmvx-bytecode-fb", {iree.encoding.resolver = #iree_cpu.vmvx_encoding_resolver<>}>
102102
} {
103103
%c32_i64 = arith.constant 32 : i64
104104
%cst = arith.constant 0.000000e+00 : f32
105105
%c0 = arith.constant 0 : index
106106
%0 = hal.interface.binding.subspan layout(#pipeline_layout) binding(0) alignment(64) offset(%c0) flags(ReadOnly) : !iree_tensor_ext.dispatch.tensor<readonly:tensor<1x2xf32, #encoding_lhs>>
107107
%1 = hal.interface.binding.subspan layout(#pipeline_layout) binding(1) alignment(64) offset(%c0) flags(ReadOnly) : !iree_tensor_ext.dispatch.tensor<readonly:tensor<2x3xf32, #encoding_rhs>>
108-
%2 = hal.interface.binding.subspan layout(#pipeline_layout) binding(2) alignment(64) offset(%c0) : !iree_tensor_ext.dispatch.tensor<writeonly:tensor<1x3xf32, #encoding_result>>{%arg4, %arg5}
108+
%2 = hal.interface.binding.subspan layout(#pipeline_layout) binding(2) alignment(64) offset(%c0) : !iree_tensor_ext.dispatch.tensor<writeonly:tensor<1x3xf32, #encoding_result>>
109109
%3 = iree_tensor_ext.dispatch.tensor.load %0, offsets = [0, 0], sizes = [1, 2], strides = [1, 1] : !iree_tensor_ext.dispatch.tensor<readonly:tensor<1x2xf32, #encoding_lhs>> -> tensor<1x2xf32, #encoding_lhs>
110110
%4 = iree_tensor_ext.dispatch.tensor.load %1, offsets = [0, 0], sizes = [2, 3], strides = [1, 1] : !iree_tensor_ext.dispatch.tensor<readonly:tensor<2x3xf32, #encoding_rhs>> -> tensor<2x3xf32, #encoding_rhs>
111111
%7 = tensor.empty() : tensor<1x3xf32, #encoding_result>

compiler/src/iree/compiler/Codegen/LLVMCPU/ConvertToLLVM.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,6 @@ void ConvertToLLVMPass::runOnOperation() {
10541054
// Some n-D vectors are generated by EmulateNarrowType pass, so we need to
10551055
// unroll them to 1-D before converting to the LLVM dialect.
10561056
vector::populateVectorBitCastLoweringPatterns(patterns);
1057-
populateVectorToLLVMMatrixConversionPatterns(typeConverter, patterns);
10581057
vector::populateVectorRankReducingFMAPattern(patterns);
10591058
vector::populateVectorInsertExtractStridedSliceTransforms(patterns);
10601059
vector::populateVectorStepLoweringPatterns(patterns);

third_party/llvm-project

Submodule llvm-project updated 1198 files

0 commit comments

Comments
 (0)