[Mlir-commits] [mlir] [mlir][linalg] Introduce transpose semantic to 'linalg.matmul' ops. (PR #104783)
Md Asghar Ahmad Shahid
llvmlistbot at llvm.org
Mon Sep 9 21:56:28 PDT 2024
================
@@ -148,15 +153,30 @@ static void fillStructuredOpRegion(OpBuilder &opBuilder, Region ®ion,
// iterator_types is an auto-generated method.
}
+static void getDefaultIndexingMap(MLIRContext *context,
+ SmallVectorImpl<Attribute> &indexingMaps) {
+ Attribute mapAttr;
+ mapAttr = llvm::cast<AffineMapAttr>(
+ mlir::parseAttribute("affine_map<(d0, d1, d2)->(d0, d2)>", context));
+ indexingMaps.push_back(mapAttr);
+ mapAttr = llvm::cast<AffineMapAttr>(
+ mlir::parseAttribute("affine_map<(d0, d1, d2)->(d2, d1)>", context));
+ indexingMaps.push_back(mapAttr);
+ mapAttr = llvm::cast<AffineMapAttr>(
+ mlir::parseAttribute("affine_map<(d0, d1, d2)->(d0, d1)>", context));
+ indexingMaps.push_back(mapAttr);
+}
+
/// Creates a structured operation given `inputs`, `outputs`, and `attributes`.
/// The result types are derived automatically if `resultTensorTypes` is none.
/// The body of the operation is filled using `regionBuilder`. All ods-gen
/// created structured operations use the method to implement their builders.
-static void buildStructuredOp(OpBuilder &b, OperationState &state,
- std::optional<TypeRange> resultTensorTypes,
- ValueRange inputs, ValueRange outputs,
- ArrayRef<NamedAttribute> attributes,
- RegionBuilderFn regionBuilder) {
+static void buildStructuredOp(
----------------
shahidact wrote:
This was required to handle a test failure related to "Specialize" pass. I will check by removing the the "linalg.matmul" check.
https://github.com/llvm/llvm-project/pull/104783
More information about the Mlir-commits
mailing list