Skip to content

Commit b0dfb06

Browse files
committed
bump llvm
1 parent d5e6a56 commit b0dfb06

30 files changed

+75
-80
lines changed

cmake/llvm-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
add6b2f35f2bcf1f59a2ab2d5b3dab124fe0895a
1+
7842374103b26933d71a8fe354cd4d8715d55b1c

include/gc/Dialect/LLVMIR/XeVMOps.td

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def XeVM_L1StoreCacheControl : XeVM_StoreCacheControl<"L1">;
7070
def XeVM_L3StoreCacheControl : XeVM_StoreCacheControl<"L3">;
7171

7272
def XeVM_BlockLoad2dOp : XeVM_Op<"blockload2d">,
73-
Results<(outs FixedVectorOf<[XeVM_ElemType]>:$res)>,
73+
Results<(outs FixedVectorOfRankAndType<[1,2,3], [XeVM_ElemType]>:$res)>,
7474
Arguments<(ins
7575
Arg<LLVM_AnyPointer, "", [MemRead]>:$ptr,
7676
I32:$base_width,
@@ -137,7 +137,7 @@ def XeVM_BlockStore2dOp : XeVM_Op<"blockstore2d">,
137137
I32Attr:$tile_width,
138138
I32Attr:$tile_height,
139139
I32Attr:$v_blocks,
140-
FixedVectorOf<[XeVM_ElemType]>:$stored_val,
140+
FixedVectorOfRankAndType<[1, 2, 3], [XeVM_ElemType]>:$stored_val,
141141
DefaultValuedAttr<XeVM_L1StoreCacheControl, "::mlir::xevm::L1StoreCacheControl::DEFAULT">:$l1_cache_control,
142142
DefaultValuedAttr<XeVM_L3StoreCacheControl, "::mlir::xevm::L3StoreCacheControl::DEFAULT">:$l3_cache_control
143143
)> {
@@ -243,7 +243,7 @@ def XeVM_PrecisionTypeAttr : I32EnumAttr<"PrecisionType",
243243
}
244244

245245
def XeVM_DPASOp : XeVM_Op<"dpas">,
246-
Results<(outs FixedVectorOf<[XeVM_MatrixElemType]>:$d)>,
246+
Results<(outs FixedVectorOfRankAndType<[1], [XeVM_MatrixElemType]>:$d)>,
247247
Arguments<(ins
248248
FixedVectorOfRankAndType<[1], [XeVM_MatrixElemType]>:$c,
249249
FixedVectorOfRankAndType<[1], [XeVM_MatrixElemType]>:$a,

include/gc/Transforms/Microkernel/BrgemmRuntimeUtils.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ static inline int64_t getDnnlDataTypeVal(RewriterBase &rewriter,
2727
auto context = rewriter.getContext();
2828
auto tattr = dyn_cast_or_null<TypeAttr>(attr);
2929
assert(tattr);
30-
if (tattr == TypeAttr::get(FloatType::getF32(context))) {
30+
if (tattr == TypeAttr::get(Float32Type::get(context))) {
3131
return static_cast<int64_t>(dnnl_f32);
32-
} else if (tattr == TypeAttr::get(FloatType::getF64(context))) {
32+
} else if (tattr == TypeAttr::get(Float64Type::get(context))) {
3333
return static_cast<int64_t>(dnnl_f64);
34-
} else if (tattr == TypeAttr::get(FloatType::getBF16(context))) {
34+
} else if (tattr == TypeAttr::get(BFloat16Type::get(context))) {
3535
return static_cast<int64_t>(dnnl_bf16);
36-
} else if (tattr == TypeAttr::get(FloatType::getF16(context))) {
36+
} else if (tattr == TypeAttr::get(Float16Type::get(context))) {
3737
return static_cast<int64_t>(dnnl_f16);
3838
} else if (tattr == TypeAttr::get(
3939
IntegerType::get(context, 32, IntegerType::Signed))) {

include/gc/Transforms/Utils/StructuredOpMatcher.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ struct HasStaticStrides {
163163
SmallVector<int64_t> strides;
164164
if (auto memRefType = dyn_cast_or_null<MemRefType>(operandType)) {
165165
int64_t offset;
166-
if (failed(getStridesAndOffset(memRefType, strides, offset)))
166+
if (failed(memRefType.getStridesAndOffset(strides, offset)))
167167
return false;
168168
if (llvm::any_of(strides, [](int64_t stride) {
169169
return stride == ShapedType::kDynamic;
@@ -244,7 +244,8 @@ struct NumDpsInits {
244244
// Callable object to validate number of input operands for `op`.
245245
struct NumDpsInputs {
246246
NumDpsInputs() = delete;
247-
explicit NumDpsInputs(std::function<bool(size_t)> fun) : fun(std::move(fun)){};
247+
explicit NumDpsInputs(std::function<bool(size_t)> fun)
248+
: fun(std::move(fun)){};
248249

249250
bool operator()(Operation *op) {
250251
if (auto linalgOp = dyn_cast_or_null<linalg::LinalgOp>(op))

lib/gc/Dialect/Linalgx/Utils.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ bool isGenericAttrEquivalent(linalg::GenericOp op, ShapedType shapeA,
385385
DenseMap<AffineExpr, AffineExpr> replaceMap;
386386
std::map<unsigned, utils::IteratorType> iterMap;
387387
// get shape-to-loop map
388-
AffineMap inverse = inversePermutation(concatAffineMaps(inMaps));
388+
AffineMap inverse = inversePermutation(concatAffineMaps(inMaps, context));
389389
assert(inverse && "shape-to-loops map to be non-null");
390390
assert(dimSize == inverse.getResults().size());
391391
// renumber the dim id based on shape-to-loop map
@@ -492,8 +492,10 @@ bool isGenericPackedMatmulOpImpl(linalg::GenericOp genericOp,
492492
return false;
493493
}
494494
// Check for packing
495-
ValueRange inputs = genericOp.getDpsInputs();
496-
ValueRange outputs = genericOp.getDpsInits();
495+
auto inputsVec = genericOp.getDpsInputs();
496+
ValueRange inputs = inputsVec;
497+
auto outputsVec = genericOp.getDpsInits();
498+
ValueRange outputs = outputsVec;
497499
auto shapeA = cast<ShapedType>(inputs.front().getType());
498500
auto shapeB = cast<ShapedType>(inputs.back().getType());
499501
auto shapeC = cast<ShapedType>(outputs.back().getType());

lib/gc/Dialect/Microkernel/MicrokernelOps.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -551,11 +551,11 @@ static LogicalResult verifyBrgemmDataTypes(ArrayAttr dtypes,
551551

552552
auto context = op.getContext();
553553

554-
#define FTAttr(t) TypeAttr::get(FloatType::get##t(context))
554+
#define FTAttr(t) TypeAttr::get(t::get(context))
555555
#define ITAttr(s, w) TypeAttr::get(IntegerType::get(context, w, IntegerType::s))
556556
SmallVector<std::pair<TypeAttr, TypeAttr>> validDataTypes = {
557-
{FTAttr(F32), FTAttr(F32)},
558-
{FTAttr(BF16), FTAttr(BF16)},
557+
{FTAttr(Float32Type), FTAttr(Float32Type)},
558+
{FTAttr(BFloat16Type), FTAttr(BFloat16Type)},
559559
{ITAttr(Unsigned, 8), ITAttr(Signed, 8)},
560560
{ITAttr(Signed, 8), ITAttr(Unsigned, 8)},
561561
{ITAttr(Unsigned, 8), ITAttr(Unsigned, 8)},

lib/gc/ExecutionEngine/GPURuntime/ocl/GpuOclRuntime.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ StringRef createStaticMain(OpBuilder &builder, ModuleOp &module,
718718
auto offsetPtr = constArgs.end();
719719
constArgs.emplace_back(0);
720720
constArgs.append(shape.begin(), shape.end());
721-
if (failed(getStridesAndOffset(type, constArgs, *offsetPtr))) {
721+
if (failed(type.getStridesAndOffset(constArgs, *offsetPtr))) {
722722
gcLogD("Failed to get strides and offset of arg", i,
723723
" of the function ", funcName.begin());
724724
return {};
@@ -929,8 +929,9 @@ OclModuleBuilder::build(const OclRuntime::Ext &ext) {
929929
builder.getI64IntegerAttr(static_cast<int64_t>(wgSize)));
930930
TargetDeviceSpecInterface devSpec =
931931
TargetDeviceSpecAttr::get(ctx, dltiAttrs);
932-
auto sysSpec =
933-
TargetSystemSpecAttr::get(ctx, ArrayRef(std::pair(devStr, devSpec)));
932+
DataLayoutEntryInterface dl =
933+
DataLayoutEntryAttr::get(ctx, devStr, devSpec);
934+
auto sysSpec = TargetSystemSpecAttr::get(ctx, ArrayRef(dl));
934935
mod = mlirModule.clone();
935936
mod.getOperation()->setAttr("#dlti.sys_spec", sysSpec);
936937
PassManager pm{ctx};

lib/gc/Transforms/DecomposeAggregatedOps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct DecomposeAggregatedOps
4242
void runOnOperation() override {
4343
RewritePatternSet patterns(getOperation().getContext());
4444
patterns.add<DecomposeAggregateOpsImpl>(patterns.getContext());
45-
(void)applyPatternsAndFoldGreedily(getOperation(), std::move(patterns));
45+
(void)applyPatternsGreedily(getOperation(), std::move(patterns));
4646
}
4747
};
4848

lib/gc/Transforms/DecomposeTensorOperation.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,7 @@ struct DecomposeTensorOperationPass
170170
patterns.add<DecomposeGatherOp>(patterns.getContext());
171171
tensor::populateDecomposeTensorConcatPatterns(patterns);
172172

173-
if (failed(applyPatternsAndFoldGreedily(getOperation(),
174-
std::move(patterns)))) {
173+
if (failed(applyPatternsGreedily(getOperation(), std::move(patterns)))) {
175174
return signalPassFailure();
176175
}
177176
}

lib/gc/Transforms/DeepTileContractionOp.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ generateOuterLoop(RewriterBase &b, linalg::LinalgOp linalgOp,
405405
// the extra copy generated by bufferization. So remove the dummy loop
406406
// at this early stage.
407407
if (!isDummyLoop(tilingResult->loops.back())) {
408-
b.replaceOp(currentOp, tilingResult->replacements);
408+
b.replaceOp(currentOp, tilingResult->mergeResult.replacements);
409409
currentOp = dyn_cast<linalg::LinalgOp>(tilingResult->tiledOps.back());
410410
if (iteratorTypes[d] == mlir::utils::IteratorType::reduction)
411411
result.reductionLoops.push_back(tilingResult->loops.back());
@@ -477,7 +477,7 @@ generateOuterLoop(RewriterBase &b, linalg::LinalgOp linalgOp,
477477
b, cast<TilingInterface>(currentOp.getOperation()), tileOption);
478478
if (failed(tilingResult))
479479
return failure();
480-
b.replaceOp(currentOp, tilingResult->replacements);
480+
b.replaceOp(currentOp, tilingResult->mergeResult.replacements);
481481
currentOp = dyn_cast<linalg::LinalgOp>(tilingResult->tiledOps.back());
482482
}
483483
}
@@ -1029,8 +1029,7 @@ struct DeepTileContractionOp
10291029
dialect->getCanonicalizationPatterns(patterns);
10301030
for (RegisteredOperationName op : ctx.getRegisteredOperations())
10311031
op.getCanonicalizationPatterns(patterns, &ctx);
1032-
if (failed(
1033-
applyPatternsAndFoldGreedily(getOperation(), std::move(patterns))))
1032+
if (failed(applyPatternsGreedily(getOperation(), std::move(patterns))))
10341033
return signalPassFailure();
10351034
}
10361035
};

0 commit comments

Comments
 (0)