mirror of
https://github.com/intel/llvm.git
synced 2026-02-07 16:11:27 +08:00
[mlir][transform] Consistent linalg transform op syntax for dynamic index lists (#90897)
This patch is a first pass at making consistent syntax across the `LinalgTransformOp`s that use dynamic index lists for size parameters. Previously, there were two different forms: inline types in the list, or place them in the functional style tuple. This patch goes for the latter. In order to do this, the `printPackedOrDynamicIndexList`, `printDynamicIndexList` and their `parse` counterparts were modified so that the types can be optionally provided to the corresponding custom directives. All affected ops now use tablegen `assemblyFormat`, so custom `parse`/`print` functions have been removed. There are a couple ops that will likely add dynamic size support, and once that happens it should be made sure that the assembly remains consistent with the changes in this patch. The affected ops are as follows: `pack`, `pack_greedily`, `tile_using_forall`. The `tile_using_for` and `vectorize` ops already used this syntax, but their custom assembly was removed. --------- Co-authored-by: Oleksandr "Alex" Zinenko <ftynse@gmail.com>
This commit is contained in:
@@ -783,10 +783,9 @@ def PackOp : Op<Transform_Dialect, "structured.pack", [
|
||||
let assemblyFormat = [{
|
||||
$target
|
||||
`packed_sizes` `=` custom<DynamicIndexList>($packed_sizes,
|
||||
$static_packed_sizes,
|
||||
type($packed_sizes))
|
||||
$static_packed_sizes)
|
||||
attr-dict
|
||||
`:` functional-type($target, results)
|
||||
`:` functional-type(operands, results)
|
||||
}];
|
||||
|
||||
let builders = [
|
||||
@@ -890,14 +889,13 @@ def PackGreedilyOp : Op<Transform_Dialect, "structured.pack_greedily", [
|
||||
$target
|
||||
oilist(
|
||||
`matmul_packed_sizes` `=` custom<DynamicIndexList>($matmul_packed_sizes,
|
||||
$static_matmul_packed_sizes,
|
||||
type($matmul_packed_sizes))
|
||||
$static_matmul_packed_sizes)
|
||||
(`matmul_padded_sizes_next_multiple_of` `=`
|
||||
$matmul_padded_sizes_next_multiple_of^)?
|
||||
`matmul_inner_dims_order` `=` $matmul_inner_dims_order
|
||||
)
|
||||
attr-dict
|
||||
`:` functional-type($target, results)
|
||||
`:` functional-type(operands, results)
|
||||
}];
|
||||
let hasVerifier = 1;
|
||||
|
||||
@@ -1899,7 +1897,17 @@ def TileUsingForOp : Op<Transform_Dialect, "structured.tile_using_for",
|
||||
$scalableSizes)>,
|
||||
];
|
||||
|
||||
let hasCustomAssemblyFormat = 1;
|
||||
let assemblyFormat = [{
|
||||
$target
|
||||
`tile_sizes` custom<DynamicIndexList>(
|
||||
$dynamic_sizes,
|
||||
$static_sizes,
|
||||
$scalable_sizes)
|
||||
(`interchange` `=` $interchange^)?
|
||||
attr-dict
|
||||
`:` functional-type(operands, results)
|
||||
}];
|
||||
|
||||
let hasVerifier = 1;
|
||||
|
||||
let extraClassDeclaration = [{
|
||||
@@ -2017,17 +2025,13 @@ def TileUsingForallOp :
|
||||
let assemblyFormat = [{
|
||||
$target oilist(
|
||||
`num_threads` custom<PackedOrDynamicIndexList>($packed_num_threads,
|
||||
type($packed_num_threads),
|
||||
$num_threads,
|
||||
type($num_threads),
|
||||
$static_num_threads) |
|
||||
`tile_sizes` custom<PackedOrDynamicIndexList>($packed_tile_sizes,
|
||||
type($packed_tile_sizes),
|
||||
$tile_sizes,
|
||||
type($tile_sizes),
|
||||
$static_tile_sizes))
|
||||
(`(` `mapping` `=` $mapping^ `)`)? attr-dict
|
||||
`:` functional-type($target, results)
|
||||
`:` functional-type(operands, results)
|
||||
}];
|
||||
let hasVerifier = 1;
|
||||
|
||||
@@ -2162,7 +2166,18 @@ def VectorizeOp : Op<Transform_Dialect, "structured.vectorize",
|
||||
|
||||
let results = (outs);
|
||||
|
||||
let hasCustomAssemblyFormat = 1;
|
||||
// We use oilist here to elide the optional `vector_sizes` when empty list
|
||||
// is passed.
|
||||
let assemblyFormat = [{
|
||||
$target oilist(
|
||||
`vector_sizes` custom<DynamicIndexList>(
|
||||
$vector_sizes,
|
||||
$static_vector_sizes,
|
||||
$scalable_sizes))
|
||||
attr-dict
|
||||
`:` type($target)(`,`type($vector_sizes)^)?
|
||||
}];
|
||||
|
||||
let hasVerifier = 1;
|
||||
|
||||
let extraClassDeclaration = [{
|
||||
|
||||
@@ -37,6 +37,12 @@ void printPackedOrDynamicIndexList(OpAsmPrinter &printer, Operation *op,
|
||||
Value packed, Type packedType,
|
||||
OperandRange values, TypeRange valueTypes,
|
||||
DenseI64ArrayAttr integers);
|
||||
inline void printPackedOrDynamicIndexList(OpAsmPrinter &printer, Operation *op,
|
||||
Value packed, OperandRange values,
|
||||
DenseI64ArrayAttr integers) {
|
||||
printPackedOrDynamicIndexList(printer, op, packed, Type(), values,
|
||||
TypeRange{}, integers);
|
||||
}
|
||||
|
||||
/// Parser hook for custom directive in assemblyFormat.
|
||||
///
|
||||
@@ -47,7 +53,15 @@ void printPackedOrDynamicIndexList(OpAsmPrinter &printer, Operation *op,
|
||||
ParseResult parsePackedOrDynamicIndexList(
|
||||
OpAsmParser &parser, std::optional<OpAsmParser::UnresolvedOperand> &packed,
|
||||
Type &packedType, SmallVectorImpl<OpAsmParser::UnresolvedOperand> &values,
|
||||
SmallVectorImpl<Type> &valueTypes, DenseI64ArrayAttr &integers);
|
||||
SmallVectorImpl<Type> *valueTypes, DenseI64ArrayAttr &integers);
|
||||
inline ParseResult parsePackedOrDynamicIndexList(
|
||||
OpAsmParser &parser, std::optional<OpAsmParser::UnresolvedOperand> &packed,
|
||||
SmallVectorImpl<OpAsmParser::UnresolvedOperand> &values,
|
||||
DenseI64ArrayAttr &integers) {
|
||||
Type packedType;
|
||||
return parsePackedOrDynamicIndexList(parser, packed, packedType, values,
|
||||
nullptr, integers);
|
||||
}
|
||||
} // namespace transform
|
||||
} // namespace mlir
|
||||
|
||||
|
||||
@@ -106,9 +106,16 @@ public:
|
||||
/// empty then assume that all indices are non-scalable.
|
||||
void printDynamicIndexList(
|
||||
OpAsmPrinter &printer, Operation *op, OperandRange values,
|
||||
ArrayRef<int64_t> integers, TypeRange valueTypes = TypeRange(),
|
||||
ArrayRef<bool> scalables = {},
|
||||
ArrayRef<int64_t> integers, ArrayRef<bool> scalables,
|
||||
TypeRange valueTypes = TypeRange(),
|
||||
AsmParser::Delimiter delimiter = AsmParser::Delimiter::Square);
|
||||
inline void printDynamicIndexList(
|
||||
OpAsmPrinter &printer, Operation *op, OperandRange values,
|
||||
ArrayRef<int64_t> integers, TypeRange valueTypes = TypeRange(),
|
||||
AsmParser::Delimiter delimiter = AsmParser::Delimiter::Square) {
|
||||
return printDynamicIndexList(printer, op, values, integers, {}, valueTypes,
|
||||
delimiter);
|
||||
}
|
||||
|
||||
/// Parser hook for custom directive in assemblyFormat.
|
||||
///
|
||||
|
||||
@@ -2823,86 +2823,6 @@ SmallVector<OpFoldResult> transform::TileUsingForOp::getMixedSizes() {
|
||||
return results;
|
||||
}
|
||||
|
||||
// We want to parse `DenseI64ArrayAttr` using the short form without the
|
||||
// `array` prefix to be consistent in the IR with `parseDynamicIndexList`.
|
||||
ParseResult parseOptionalInterchange(OpAsmParser &parser,
|
||||
OperationState &result) {
|
||||
if (failed(parser.parseOptionalKeyword("interchange")))
|
||||
return success();
|
||||
if (failed(parser.parseEqual()))
|
||||
return failure();
|
||||
result.addAttribute(
|
||||
transform::TileUsingForOp::getInterchangeAttrName(result.name),
|
||||
DenseI64ArrayAttr::parse(parser, Type{}));
|
||||
return success();
|
||||
}
|
||||
|
||||
void printOptionalInterchange(OpAsmPrinter &p,
|
||||
ArrayRef<int64_t> interchangeVals) {
|
||||
if (!interchangeVals.empty()) {
|
||||
p << " interchange = [";
|
||||
llvm::interleaveComma(interchangeVals, p,
|
||||
[&](int64_t integer) { p << integer; });
|
||||
p << "]";
|
||||
}
|
||||
}
|
||||
|
||||
ParseResult transform::TileUsingForOp::parse(OpAsmParser &parser,
|
||||
OperationState &result) {
|
||||
OpAsmParser::UnresolvedOperand target;
|
||||
SmallVector<OpAsmParser::UnresolvedOperand> dynamicSizes;
|
||||
DenseI64ArrayAttr staticSizes;
|
||||
FunctionType functionalType;
|
||||
llvm::SMLoc operandLoc;
|
||||
DenseBoolArrayAttr scalableVals;
|
||||
|
||||
if (parser.parseOperand(target) || parser.getCurrentLocation(&operandLoc) ||
|
||||
parseDynamicIndexList(parser, dynamicSizes, staticSizes, scalableVals) ||
|
||||
parseOptionalInterchange(parser, result) ||
|
||||
parser.parseOptionalAttrDict(result.attributes) ||
|
||||
parser.parseColonType(functionalType))
|
||||
return ParseResult::failure();
|
||||
|
||||
size_t numExpectedLoops =
|
||||
staticSizes.size() - llvm::count(staticSizes.asArrayRef(), 0);
|
||||
if (functionalType.getNumResults() != numExpectedLoops + 1) {
|
||||
return parser.emitError(parser.getNameLoc())
|
||||
<< "expected " << (numExpectedLoops + 1) << " result type(s)";
|
||||
}
|
||||
if (functionalType.getNumInputs() != dynamicSizes.size() + 1) {
|
||||
return parser.emitError(operandLoc)
|
||||
<< "expected " << dynamicSizes.size() + 1 << " operand type(s)";
|
||||
}
|
||||
if (parser.resolveOperand(target, functionalType.getInputs().front(),
|
||||
result.operands) ||
|
||||
parser.resolveOperands(dynamicSizes,
|
||||
functionalType.getInputs().drop_front(),
|
||||
operandLoc, result.operands)) {
|
||||
return failure();
|
||||
}
|
||||
|
||||
result.addAttribute(getScalableSizesAttrName(result.name), scalableVals);
|
||||
|
||||
result.addAttribute(getStaticSizesAttrName(result.name), staticSizes);
|
||||
result.addTypes(functionalType.getResults());
|
||||
return success();
|
||||
}
|
||||
|
||||
void TileUsingForOp::print(OpAsmPrinter &p) {
|
||||
p << ' ' << getTarget();
|
||||
printDynamicIndexList(p, getOperation(), getDynamicSizes(), getStaticSizes(),
|
||||
/*valueTypes=*/{}, getScalableSizesAttr(),
|
||||
OpAsmParser::Delimiter::Square);
|
||||
printOptionalInterchange(p, getInterchange());
|
||||
p.printOptionalAttrDict(
|
||||
(*this)->getAttrs(),
|
||||
/*elidedAttrs=*/{getInterchangeAttrName(getOperation()->getName()),
|
||||
getScalableSizesAttrName(getOperation()->getName()),
|
||||
getStaticSizesAttrName(getOperation()->getName())});
|
||||
p << " : ";
|
||||
p.printFunctionalType(getOperands().getTypes(), getResults().getTypes());
|
||||
}
|
||||
|
||||
void transform::TileUsingForOp::getEffects(
|
||||
SmallVectorImpl<MemoryEffects::EffectInstance> &effects) {
|
||||
consumesHandle(getTarget(), effects);
|
||||
@@ -3219,80 +3139,6 @@ transform::VectorizeChildrenAndApplyPatternsOp::applyToOne(
|
||||
// VectorizeOp
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
static const StringLiteral kVectorSizesKeyword = "vector_sizes";
|
||||
|
||||
ParseResult transform::VectorizeOp::parse(OpAsmParser &parser,
|
||||
OperationState &result) {
|
||||
OpAsmParser::UnresolvedOperand target;
|
||||
SmallVector<OpAsmParser::UnresolvedOperand> dynamicSizes;
|
||||
DenseI64ArrayAttr staticSizes;
|
||||
SmallVector<Type> operandTypes;
|
||||
llvm::SMLoc operandLoc;
|
||||
DenseBoolArrayAttr scalableVals;
|
||||
|
||||
if (parser.parseOperand(target) || parser.getCurrentLocation(&operandLoc))
|
||||
return ParseResult::failure();
|
||||
|
||||
if (succeeded(parser.parseOptionalKeyword(kVectorSizesKeyword))) {
|
||||
if (failed(parseDynamicIndexList(parser, dynamicSizes, staticSizes,
|
||||
scalableVals)))
|
||||
return ParseResult::failure();
|
||||
}
|
||||
|
||||
if (succeeded(parser.parseOptionalKeyword(
|
||||
getVectorizeNdExtractAttrName(result.name))))
|
||||
result.addAttribute(getVectorizeNdExtractAttrName(result.name),
|
||||
parser.getBuilder().getUnitAttr());
|
||||
|
||||
if (parser.parseOptionalAttrDict(result.attributes) ||
|
||||
parser.parseColonTypeList(operandTypes))
|
||||
return ParseResult::failure();
|
||||
|
||||
if (operandTypes.size() != dynamicSizes.size() + 1) {
|
||||
return parser.emitError(operandLoc)
|
||||
<< "expected " << dynamicSizes.size() + 1 << " operand type(s)";
|
||||
}
|
||||
if (parser.resolveOperand(target, operandTypes.front(), result.operands) ||
|
||||
parser.resolveOperands(dynamicSizes, ArrayRef(operandTypes).drop_front(),
|
||||
operandLoc, result.operands)) {
|
||||
return failure();
|
||||
}
|
||||
|
||||
if (scalableVals)
|
||||
result.addAttribute(getScalableSizesAttrName(result.name), scalableVals);
|
||||
if (staticSizes)
|
||||
result.addAttribute(getStaticVectorSizesAttrName(result.name), staticSizes);
|
||||
|
||||
return success();
|
||||
}
|
||||
|
||||
void transform::VectorizeOp::print(OpAsmPrinter &p) {
|
||||
p << ' ' << getTarget() << ' ';
|
||||
if (!getMixedVectorSizes().empty()) {
|
||||
p << kVectorSizesKeyword << ' ';
|
||||
printDynamicIndexList(p, getOperation(), getVectorSizes(),
|
||||
getStaticVectorSizesAttr(),
|
||||
/*valueTypes=*/{}, getScalableSizesAttr(),
|
||||
OpAsmParser::Delimiter::Square);
|
||||
}
|
||||
|
||||
if (getVectorizeNdExtract())
|
||||
p << getVectorizeNdExtractAttrName() << ' ';
|
||||
|
||||
p.printOptionalAttrDict(
|
||||
(*this)->getAttrs(),
|
||||
/*elidedAttrs=*/{
|
||||
getScalableSizesAttrName(getOperation()->getName()),
|
||||
getStaticVectorSizesAttrName(getOperation()->getName())});
|
||||
p << " : ";
|
||||
p << getTarget().getType();
|
||||
if (!getVectorSizes().empty()) {
|
||||
p << ", ";
|
||||
llvm::interleaveComma(getVectorSizes(), p,
|
||||
[&](Value operand) { p << operand.getType(); });
|
||||
}
|
||||
}
|
||||
|
||||
DiagnosedSilenceableFailure transform::VectorizeOp::apply(
|
||||
transform::TransformRewriter &rewriter,
|
||||
mlir::transform::TransformResults &transformResults,
|
||||
|
||||
@@ -20,7 +20,11 @@ void mlir::transform::printPackedOrDynamicIndexList(
|
||||
if (packed) {
|
||||
assert(values.empty() && (!integers || integers.empty()) &&
|
||||
"expected no values/integers");
|
||||
printer << "*(" << packed << " : " << packedType << ")";
|
||||
printer << "*(" << packed;
|
||||
if (packedType) {
|
||||
printer << " : " << packedType;
|
||||
}
|
||||
printer << ")";
|
||||
return;
|
||||
}
|
||||
printDynamicIndexList(printer, op, values, integers, valueTypes);
|
||||
@@ -29,19 +33,20 @@ void mlir::transform::printPackedOrDynamicIndexList(
|
||||
ParseResult mlir::transform::parsePackedOrDynamicIndexList(
|
||||
OpAsmParser &parser, std::optional<OpAsmParser::UnresolvedOperand> &packed,
|
||||
Type &packedType, SmallVectorImpl<OpAsmParser::UnresolvedOperand> &values,
|
||||
SmallVectorImpl<Type> &valueTypes, DenseI64ArrayAttr &integers) {
|
||||
SmallVectorImpl<Type> *valueTypes, DenseI64ArrayAttr &integers) {
|
||||
OpAsmParser::UnresolvedOperand packedOperand;
|
||||
if (parser.parseOptionalStar().succeeded()) {
|
||||
if (parser.parseLParen().failed() ||
|
||||
parser.parseOperand(packedOperand).failed() ||
|
||||
parser.parseColonType(packedType).failed() ||
|
||||
parser.parseRParen().failed()) {
|
||||
parser.parseOperand(packedOperand).failed())
|
||||
return failure();
|
||||
if (packedType && (parser.parseColonType(packedType).failed()))
|
||||
return failure();
|
||||
if (parser.parseRParen().failed())
|
||||
return failure();
|
||||
}
|
||||
packed.emplace(packedOperand);
|
||||
integers = parser.getBuilder().getDenseI64ArrayAttr({});
|
||||
return success();
|
||||
}
|
||||
|
||||
return parseDynamicIndexList(parser, values, integers, &valueTypes);
|
||||
return parseDynamicIndexList(parser, values, integers, valueTypes);
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ static char getRightDelimiter(AsmParser::Delimiter delimiter) {
|
||||
void mlir::printDynamicIndexList(OpAsmPrinter &printer, Operation *op,
|
||||
OperandRange values,
|
||||
ArrayRef<int64_t> integers,
|
||||
TypeRange valueTypes, ArrayRef<bool> scalables,
|
||||
ArrayRef<bool> scalables, TypeRange valueTypes,
|
||||
AsmParser::Delimiter delimiter) {
|
||||
char leftDelimiter = getLeftDelimiter(delimiter);
|
||||
char rightDelimiter = getRightDelimiter(delimiter);
|
||||
|
||||
@@ -15,7 +15,7 @@ func.func @matmul_tensors(
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.consumed}) {
|
||||
%0 = transform.structured.match ops{["linalg.matmul"]} in %module_op : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 [2, 2, 2] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 tile_sizes [2, 2, 2] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%2 = transform.get_parent_op %1 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
|
||||
transform.structured.vectorize_children_and_apply_patterns %2 : (!transform.any_op) -> !transform.any_op
|
||||
%b = transform.bufferization.one_shot_bufferize layout{IdentityLayoutMap}
|
||||
|
||||
@@ -27,7 +27,7 @@ func.func @KCRS_to_KCRSsr(%arg0: tensor<1x1x128x64xf32>, %arg1: tensor<1x1x4x8x8
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["tensor.pack"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:4 = transform.structured.tile_using_for %0 [1, 1, 1, 1] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:4 = transform.structured.tile_using_for %0 tile_sizes [1, 1, 1, 1] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -54,7 +54,7 @@ func.func @pad_and_pack(%arg0: tensor<13x15xf32>, %arg1: tensor<2x8x8x2xf32>, %a
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["tensor.pack"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 [1, 1] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 tile_sizes [1, 1] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -85,7 +85,7 @@ func.func @KC_to_CKkc(%arg0: tensor<128x256xf32>, %arg1: tensor<32x4x32x8xf32>)
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["tensor.pack"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 [1, 1] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 tile_sizes [1, 1] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ func.func @KCRSsr_to_KCRS(%arg0: tensor<1x1x4x8x8x32xf32>, %arg1: tensor<1x1x128
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["tensor.unpack"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:4 = transform.structured.tile_using_for %0 [1, 1, 32, 8] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:4 = transform.structured.tile_using_for %0 tile_sizes [1, 1, 32, 8] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -68,7 +68,7 @@ func.func @unpack_and_extract_slice(%arg0: tensor<2x8x8x2xf32>, %arg1: tensor<13
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["tensor.unpack"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 [8, 2] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 tile_sizes [8, 2] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -100,7 +100,7 @@ func.func @CKkc_to_KC(%arg0: tensor<32x4x32x8xf32>, %arg1: tensor<128x256xf32>)
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["tensor.unpack"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 [32, 8] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 tile_sizes [32, 8] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ module attributes {transform.with_named_sequence} {
|
||||
: (!transform.any_op, !transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
|
||||
// Tile linalg.matmul a second time.
|
||||
%tiled_linalg_op, %loops = transform.structured.tile_using_for %tiled_matmul_op[0, 0, 16] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%tiled_linalg_op, %loops = transform.structured.tile_using_for %tiled_matmul_op tile_sizes [0, 0, 16] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
|
||||
// Pad linalg.matmul.
|
||||
%padded, %pad, %copy_back = transform.structured.pad %tiled_linalg_op
|
||||
@@ -171,7 +171,7 @@ module attributes {transform.with_named_sequence} {
|
||||
: (!transform.any_op, !transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
|
||||
// Tile linalg.matmul a second time.
|
||||
%tiled_linalg_op, %loops = transform.structured.tile_using_for %tiled_matmul_op[0, 0, 16] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%tiled_linalg_op, %loops = transform.structured.tile_using_for %tiled_matmul_op tile_sizes [0, 0, 16] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
|
||||
// Pad linalg.matmul.
|
||||
%padded, %pad, %copy_back = transform.structured.pad %tiled_linalg_op
|
||||
|
||||
@@ -8,13 +8,13 @@ module attributes {transform.with_named_sequence} {
|
||||
%1:3 = transform.structured.multitile_sizes %0 { dimension = 0, target_size = 3} : (!transform.any_op) -> !transform.any_op
|
||||
%t:3 = transform.structured.multitile_sizes %0 { dimension = 1, target_size = 10} : (!transform.any_op) -> !transform.any_op
|
||||
%2:2 = transform.structured.split %0 after %1#2 { dimension = 0 } : !transform.any_op, !transform.any_op
|
||||
%3:2 = transform.structured.tile_using_for %2#0 [%1#0] : (!transform.any_op, !transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%4:2 = transform.structured.tile_using_for %2#1 [%1#1] : (!transform.any_op, !transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%3:2 = transform.structured.tile_using_for %2#0 tile_sizes [%1#0] : (!transform.any_op, !transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%4:2 = transform.structured.tile_using_for %2#1 tile_sizes [%1#1] : (!transform.any_op, !transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%5 = transform.merge_handles %3#0, %4#0 : !transform.any_op
|
||||
%tt:3 = transform.replicate num(%5) %t#0, %t#1, %t#2 : !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op
|
||||
%6:2 = transform.structured.split %5 after %tt#2 { dimension = 1 } : !transform.any_op, !transform.any_op
|
||||
transform.structured.tile_using_for %6#0 [0, %tt#0] : (!transform.any_op, !transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
transform.structured.tile_using_for %6#1 [0, %tt#1] : (!transform.any_op, !transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
transform.structured.tile_using_for %6#0 tile_sizes [0, %tt#0] : (!transform.any_op, !transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
transform.structured.tile_using_for %6#1 tile_sizes [0, %tt#1] : (!transform.any_op, !transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -110,13 +110,13 @@ module attributes {transform.with_named_sequence} {
|
||||
%1:3 = transform.structured.multitile_sizes %0 { dimension = 0, target_size = 3} : (!transform.any_op) -> !transform.param<i64>
|
||||
%t:3 = transform.structured.multitile_sizes %0 { dimension = 1, target_size = 10} : (!transform.any_op) -> !transform.param<i64>
|
||||
%2:2 = transform.structured.split %0 after %1#2 { dimension = 0 } : !transform.any_op, !transform.param<i64>
|
||||
%3:2 = transform.structured.tile_using_for %2#0 [%1#0] : (!transform.any_op, !transform.param<i64>) -> (!transform.any_op, !transform.any_op)
|
||||
%4:2 = transform.structured.tile_using_for %2#1 [%1#1] : (!transform.any_op, !transform.param<i64>) -> (!transform.any_op, !transform.any_op)
|
||||
%3:2 = transform.structured.tile_using_for %2#0 tile_sizes [%1#0] : (!transform.any_op, !transform.param<i64>) -> (!transform.any_op, !transform.any_op)
|
||||
%4:2 = transform.structured.tile_using_for %2#1 tile_sizes [%1#1] : (!transform.any_op, !transform.param<i64>) -> (!transform.any_op, !transform.any_op)
|
||||
%5 = transform.merge_handles %3#0, %4#0 : !transform.any_op
|
||||
%tt:3 = transform.replicate num(%5) %t#0, %t#1, %t#2 : !transform.any_op, !transform.param<i64>, !transform.param<i64>, !transform.param<i64>
|
||||
%6:2 = transform.structured.split %5 after %tt#2 { dimension = 1 } : !transform.any_op, !transform.param<i64>
|
||||
transform.structured.tile_using_for %6#0 [0, %tt#0] : (!transform.any_op, !transform.param<i64>) -> (!transform.any_op, !transform.any_op)
|
||||
transform.structured.tile_using_for %6#1 [0, %tt#1] : (!transform.any_op, !transform.param<i64>) -> (!transform.any_op, !transform.any_op)
|
||||
transform.structured.tile_using_for %6#0 tile_sizes [0, %tt#0] : (!transform.any_op, !transform.param<i64>) -> (!transform.any_op, !transform.any_op)
|
||||
transform.structured.tile_using_for %6#1 tile_sizes [0, %tt#1] : (!transform.any_op, !transform.param<i64>) -> (!transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ func.func @gemm_shared(%a : memref<?x?xf32>, %b : memref<?x?xf32>, %c : memref<?
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 [16, 16, 16] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 tile_sizes [16, 16, 16] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%2 = transform.structured.promote %1 { operands_to_promote = [0, 1], mapping = [#gpu.memory_space<workgroup>] } : (!transform.any_op) -> !transform.any_op
|
||||
transform.yield
|
||||
}
|
||||
@@ -227,7 +227,7 @@ func.func @gemm_private(%a : memref<?x?xf32>, %b : memref<?x?xf32>, %c : memref<
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 [16, 16, 16] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 tile_sizes [16, 16, 16] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%2 = transform.structured.promote %1 { operands_to_promote = [0, 1], mapping = [#gpu.memory_space<private>] } : (!transform.any_op) -> !transform.any_op
|
||||
transform.yield
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ func.func @gemm(%a : memref<?x?xf32>, %b : memref<?x?xf32>, %c : memref<?x?xf32>
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 [16, 16, 16] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 tile_sizes [16, 16, 16] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%2 = transform.structured.promote %1 { operands_to_promote = [0, 2], force_full_tiles = [false, false], use_full_tiles_by_default } : (!transform.any_op) -> !transform.any_op
|
||||
transform.yield
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ func.func @conv(%arg0 : memref<?x?xf32>, %arg1 : memref<?x?xf32>, %arg2 : memref
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.conv_2d"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loop:2 = transform.structured.tile_using_for %0 [2, 3] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loop:2 = transform.structured.tile_using_for %0 tile_sizes [2, 3] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ func.func @indexed_vector(%arg0: memref<50xindex>) {
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loop = transform.structured.tile_using_for %0 [10] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%1, %loop = transform.structured.tile_using_for %0 tile_sizes [10] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,7 @@ func.func @indexed_matrix(%arg0: memref<50x50xindex>) {
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loop:2 = transform.structured.tile_using_for %0 [10, 25] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loop:2 = transform.structured.tile_using_for %0 tile_sizes [10, 25] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ func.func @softmax(%arg0: tensor<16x64x256xf32>) -> tensor<16x64x256xf32> {
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.softmax"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loop:2 = transform.structured.tile_using_for %0 [2, 3] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loop:2 = transform.structured.tile_using_for %0 tile_sizes [2, 3] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -149,7 +149,7 @@ func.func @softmax_memref(%arg0: memref<16x64x256xf32>, %arg1: memref<16x64x256x
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.softmax"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loop:2 = transform.structured.tile_using_for %0 [2, 3] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loop:2 = transform.structured.tile_using_for %0 tile_sizes [2, 3] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ func.func @matmul_tensors(
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 [2, 3, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 tile_sizes [2, 3, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -57,7 +57,7 @@ func.func @matmul_tensors_with_size_zeros(
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1 = transform.structured.tile_using_for %0 [0, 0, 0] : (!transform.any_op) -> (!transform.any_op)
|
||||
%1 = transform.structured.tile_using_for %0 tile_sizes [0, 0, 0] : (!transform.any_op) -> (!transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -90,7 +90,7 @@ func.func @generic_op_tensors(
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 [2, 3, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 tile_sizes [2, 3, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -163,7 +163,7 @@ func.func @fold_extract_slice(
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 [2, 3, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 tile_sizes [2, 3, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,8 +130,8 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%sz = transform.structured.match ops{["test.dummy"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1:2 = transform.structured.tile_using_forall %0 tile_sizes *(%sz : !transform.any_op)
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%1:2 = transform.structured.tile_using_forall %0 tile_sizes *(%sz)
|
||||
: (!transform.any_op, !transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -333,8 +333,8 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%sz = transform.structured.match ops{["test.dummy"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1:2 = transform.structured.tile_using_forall %0 tile_sizes [%sz : !transform.any_op, 20]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%1:2 = transform.structured.tile_using_forall %0 tile_sizes [%sz, 20]
|
||||
: (!transform.any_op, !transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -492,8 +492,8 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%sz = transform.param.constant 10 : i64 -> !transform.param<i64>
|
||||
%1:2 = transform.structured.tile_using_forall %0 tile_sizes [%sz : !transform.param<i64>, 20]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%1:2 = transform.structured.tile_using_forall %0 tile_sizes [%sz, 20]
|
||||
: (!transform.any_op, !transform.param<i64>) -> (!transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -513,8 +513,8 @@ module attributes {transform.with_named_sequence} {
|
||||
%c20 = transform.param.constant 20 : i64 -> !transform.param<i64>
|
||||
%sz = transform.merge_handles %c10, %c20 : !transform.param<i64>
|
||||
// expected-error @below {{requires exactly one parameter associated}}
|
||||
%1:2 = transform.structured.tile_using_forall %0 tile_sizes [%sz : !transform.param<i64>, 20]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%1:2 = transform.structured.tile_using_forall %0 tile_sizes [%sz, 20]
|
||||
: (!transform.any_op, !transform.param<i64>) -> (!transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -562,8 +562,8 @@ module attributes {transform.with_named_sequence} {
|
||||
%c10 = transform.param.constant 10 : i64 -> !transform.any_param
|
||||
%c20 = transform.param.constant 20 : i64 -> !transform.any_param
|
||||
%sz = transform.merge_handles %c10, %c20 : !transform.any_param
|
||||
%1:2 = transform.structured.tile_using_forall %0 tile_sizes *(%sz : !transform.any_param)
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%1:2 = transform.structured.tile_using_forall %0 tile_sizes *(%sz)
|
||||
: (!transform.any_op, !transform.any_param) -> (!transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -581,8 +581,8 @@ module attributes {transform.with_named_sequence} {
|
||||
%0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%sz = transform.param.constant "[10 : i64, 20 : i64]" -> !transform.any_param
|
||||
// expected-error @below {{expected the parameter to be associated with an integer attribute}}
|
||||
%1:2 = transform.structured.tile_using_forall %0 tile_sizes *(%sz : !transform.any_param)
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%1:2 = transform.structured.tile_using_forall %0 tile_sizes *(%sz)
|
||||
: (!transform.any_op, !transform.any_param) -> (!transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%module: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.matmul"]} in %module
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
%tiled_linalg_op, %loops:3 = transform.structured.tile_using_for %0[64, 128, 256]
|
||||
%tiled_linalg_op, %loops:3 = transform.structured.tile_using_for %0 tile_sizes [64, 128, 256]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%tiled_linalg_op_0, %loops_1:3 = transform.structured.tile_using_for %tiled_linalg_op[8, 8, 8]
|
||||
%tiled_linalg_op_0, %loops_1:3 = transform.structured.tile_using_for %tiled_linalg_op tile_sizes [8, 8, 8]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.structured.vectorize %tiled_linalg_op_0 vector_sizes [8, 8, 8]
|
||||
: !transform.any_op
|
||||
|
||||
@@ -95,7 +95,7 @@ module attributes {transform.with_named_sequence} {
|
||||
%0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:2 = transform.structured.fuse %0 {tile_sizes = [5, 0, 7], tile_interchange = [0, 2, 1]}
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%2, %loops_2 = transform.structured.tile_using_for %1 [0, 4]
|
||||
%2, %loops_2 = transform.structured.tile_using_for %1 tile_sizes [0, 4]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ module attributes {transform.with_named_sequence} {
|
||||
%matmul = transform.structured.match ops{["linalg.matmul"]} in %arg1
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
|
||||
%matmul_l1, %loops_l1 = transform.structured.tile_using_for %matmul [5] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%matmul_l1, %loops_l1 = transform.structured.tile_using_for %matmul tile_sizes [5] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
|
||||
%matmul_padded, %0, %copy_back = transform.structured.pad %matmul_l1 {
|
||||
padding_values=[0.0: f32, 0.0 : f32, 0.0 : f32],
|
||||
@@ -49,7 +49,7 @@ module attributes {transform.with_named_sequence} {
|
||||
%matmul = transform.structured.match ops{["linalg.matmul"]} in %arg1
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
|
||||
%matmul_l1, %loops_l1 = transform.structured.tile_using_for %matmul [5] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%matmul_l1, %loops_l1 = transform.structured.tile_using_for %matmul tile_sizes [5] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
|
||||
%matmul_padded, %0, %copy_back = transform.structured.pad %matmul_l1 {
|
||||
padding_values=[0.0: f32, 0.0 : f32, 0.0 : f32],
|
||||
@@ -89,7 +89,7 @@ module attributes {transform.with_named_sequence} {
|
||||
%matmul = transform.structured.match ops{["linalg.matmul"]} in %arg1
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
|
||||
%matmul_l1, %loops_l1 = transform.structured.tile_using_for %matmul [5] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%matmul_l1, %loops_l1 = transform.structured.tile_using_for %matmul tile_sizes [5] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
|
||||
%matmul_padded, %0, %copy_back = transform.structured.pad %matmul_l1 {
|
||||
padding_values=[0.0: f32, 0.0 : f32, 0.0 : f32],
|
||||
@@ -129,7 +129,7 @@ module attributes {transform.with_named_sequence} {
|
||||
%matmul = transform.structured.match ops{["linalg.matmul"]} in %arg1
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
|
||||
%matmul_l1, %loops_l1 = transform.structured.tile_using_for %matmul [5] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%matmul_l1, %loops_l1 = transform.structured.tile_using_for %matmul tile_sizes [5] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
|
||||
%matmul_padded, %0, %copy_back = transform.structured.pad %matmul_l1 {
|
||||
padding_values=[0.0: f32, 0.0 : f32, 0.0 : f32],
|
||||
@@ -167,7 +167,7 @@ module attributes {transform.with_named_sequence} {
|
||||
%matmul = transform.structured.match ops{["linalg.matmul"]} in %arg1
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
|
||||
%matmul_l1, %loops_l1:2 = transform.structured.tile_using_for %matmul [5, 0, 7] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%matmul_l1, %loops_l1:2 = transform.structured.tile_using_for %matmul tile_sizes [5, 0, 7] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
|
||||
%matmul_padded, %0, %copy_back = transform.structured.pad %matmul_l1 {
|
||||
padding_values=[0.0: f32, 0.0 : f32, 0.0 : f32],
|
||||
|
||||
@@ -15,7 +15,7 @@ module attributes {transform.with_named_sequence} {
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
|
||||
|
||||
%matmul_l1, %loops_l1 = transform.structured.tile_using_for %matmul [5] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%matmul_l1, %loops_l1 = transform.structured.tile_using_for %matmul tile_sizes [5] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
|
||||
%matmul_padded, %0, %copy_back = transform.structured.pad %matmul_l1 {
|
||||
padding_values=[0.0: f32, 0.0 : f32, 0.0 : f32],
|
||||
@@ -53,7 +53,7 @@ module attributes {transform.with_named_sequence} {
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
|
||||
|
||||
%matmul_l1, %loops_l1 = transform.structured.tile_using_for %matmul [5] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%matmul_l1, %loops_l1 = transform.structured.tile_using_for %matmul tile_sizes [5] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
|
||||
%matmul_padded, %0, %copy_back = transform.structured.pad %matmul_l1 {
|
||||
padding_values=[0.0: f32, 0.0 : f32, 0.0 : f32],
|
||||
@@ -98,7 +98,7 @@ module attributes {transform.with_named_sequence} {
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
|
||||
|
||||
%matmul_l1, %loops_l1 = transform.structured.tile_using_for %matmul [5] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%matmul_l1, %loops_l1 = transform.structured.tile_using_for %matmul tile_sizes [5] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
|
||||
%matmul_padded, %0, %copy_back = transform.structured.pad %matmul_l1 {
|
||||
padding_values=[0.0: f32, 0.0 : f32, 0.0 : f32],
|
||||
@@ -145,7 +145,7 @@ module attributes {transform.with_named_sequence} {
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
|
||||
|
||||
%matmul_l1, %loops_l1 = transform.structured.tile_using_for %matmul [5] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%matmul_l1, %loops_l1 = transform.structured.tile_using_for %matmul tile_sizes [5] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
|
||||
%matmul_padded, %0, %copy_back = transform.structured.pad %matmul_l1 {
|
||||
padding_values=[0.0: f32, 0.0 : f32, 0.0 : f32],
|
||||
@@ -191,7 +191,7 @@ module attributes {transform.with_named_sequence} {
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
|
||||
|
||||
%matmul_l1, %loops_l1:2 = transform.structured.tile_using_for %matmul [5, 0, 7] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%matmul_l1, %loops_l1:2 = transform.structured.tile_using_for %matmul tile_sizes [5, 0, 7] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
|
||||
%matmul_padded, %0, %copy_back = transform.structured.pad %matmul_l1 {
|
||||
padding_values=[0.0: f32, 0.0 : f32, 0.0 : f32],
|
||||
|
||||
@@ -20,10 +20,10 @@ module attributes {transform.with_named_sequence} {
|
||||
|
||||
// Step 1: Tile
|
||||
// Tile parallel dims
|
||||
%tiled_linalg_op_p, %loops:4 = transform.structured.tile_using_for %mmt4d[1, 1, 0, 8, 8, 0]
|
||||
%tiled_linalg_op_p, %loops:4 = transform.structured.tile_using_for %mmt4d tile_sizes [1, 1, 0, 8, 8, 0]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
// Tile reduction dims
|
||||
%tiled_linalg_op_r, %loops2:2 = transform.structured.tile_using_for %tiled_linalg_op_p[0, 0, 1, 0, 0, 1]
|
||||
%tiled_linalg_op_r, %loops2:2 = transform.structured.tile_using_for %tiled_linalg_op_p tile_sizes [0, 0, 1, 0, 0, 1]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
|
||||
// Step 2: Vectorize
|
||||
|
||||
@@ -372,8 +372,8 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%sz = transform.structured.match ops{["some_tile_size"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1 = transform.structured.pack %0 packed_sizes = [0, %sz : !transform.any_op, %sz : !transform.any_op]
|
||||
: (!transform.any_op) -> (!transform.op<"linalg.generic">)
|
||||
%1 = transform.structured.pack %0 packed_sizes = [0, %sz, %sz]
|
||||
: (!transform.any_op, !transform.any_op, !transform.any_op) -> (!transform.op<"linalg.generic">)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,11 +61,11 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%root: !transform.any_op {transform.consume}) {
|
||||
// 1. Tile parallel dims
|
||||
%1 = transform.structured.match ops{["linalg.depthwise_conv_2d_nhwc_hwc"]} in %root : (!transform.any_op) -> !transform.any_op
|
||||
%tiled_linalg_op_0, %loops_1:4 = transform.structured.tile_using_for %1[1, 1, 4, [4], 0, 0] : (!transform.any_op) -> (!transform.any_op, !transform.op<"scf.for">, !transform.op<"scf.for">, !transform.op<"scf.for">, !transform.op<"scf.for">)
|
||||
%tiled_linalg_op_0, %loops_1:4 = transform.structured.tile_using_for %1 tile_sizes [1, 1, 4, [4], 0, 0] : (!transform.any_op) -> (!transform.any_op, !transform.op<"scf.for">, !transform.op<"scf.for">, !transform.op<"scf.for">, !transform.op<"scf.for">)
|
||||
|
||||
// 2. Tile reduction dims
|
||||
%2 = transform.structured.match ops{["linalg.depthwise_conv_2d_nhwc_hwc"]} in %loops_1#3 : (!transform.op<"scf.for">) -> !transform.any_op
|
||||
%tiled_linalg_op_1, %loops_2:2 = transform.structured.tile_using_for %2[0, 0, 0, 0, 1, 1] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%tiled_linalg_op_1, %loops_2:2 = transform.structured.tile_using_for %2 tile_sizes [0, 0, 0, 0, 1, 1] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
|
||||
// 3. Decompose 2D conv into 2 x 1D conv
|
||||
%3 = transform.structured.match ops{["linalg.depthwise_conv_2d_nhwc_hwc"]} in %loops_1#3 : (!transform.op<"scf.for">) -> !transform.any_op
|
||||
|
||||
@@ -67,7 +67,7 @@ module attributes {transform.with_named_sequence} {
|
||||
%matmul = transform.structured.match ops{["linalg.matmul"]} in %root : (!transform.any_op) -> !transform.any_op
|
||||
// 1. Scalable tiling
|
||||
%_, %loop_1, %loop_2, %loop_3 =
|
||||
transform.structured.tile_using_for %matmul [8, [16], 1] : (!transform.any_op)
|
||||
transform.structured.tile_using_for %matmul tile_sizes [8, [16], 1] : (!transform.any_op)
|
||||
-> (!transform.any_op, !transform.op<"scf.for">, !transform.op<"scf.for">,!transform.op<"scf.for">)
|
||||
|
||||
// 2. Loop peeling (only the middle dimension)
|
||||
|
||||
@@ -21,7 +21,7 @@ func.func @scalarize(%arg0: tensor<24x12xf32>,
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops = transform.structured.tile_using_for %0 [10, 0, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%1, %loops = transform.structured.tile_using_for %0 tile_sizes [10, 0, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%2 = transform.structured.scalarize %1 : (!transform.any_op) -> !transform.any_op
|
||||
transform.yield
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 [4, 4, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 tile_sizes [4, 4, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,7 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1 = transform.structured.match ops{["func.call"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%2, %loops:3 = transform.structured.tile_using_for %0 [%1, %1, 4] : (!transform.any_op, !transform.any_op, !transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%2, %loops:3 = transform.structured.tile_using_for %0 tile_sizes [%1, %1, 4] : (!transform.any_op, !transform.any_op, !transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -86,7 +86,7 @@ module attributes {transform.with_named_sequence} {
|
||||
// expected-note @below {{for this parameter}}
|
||||
%1 = transform.test_produce_param (0 : i64) : !transform.param<i64>
|
||||
// expected-error @below {{expected as many parameter values (0) as target ops (2)}}
|
||||
transform.structured.tile_using_for %0 [%1, %1, %1]
|
||||
transform.structured.tile_using_for %0 tile_sizes [%1, %1, %1]
|
||||
: (!transform.any_op, !transform.param<i64>, !transform.param<i64>, !transform.param<i64>)
|
||||
-> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
@@ -113,7 +113,7 @@ module attributes {transform.with_named_sequence} {
|
||||
// expected-note @below {{for this handle}}
|
||||
%1 = transform.structured.match ops{["arith.constant"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
// expected-error @below {{expected as many dynamic size-producing operations (0) as target ops (2)}}
|
||||
transform.structured.tile_using_for %0 [%1, %1, 1]
|
||||
transform.structured.tile_using_for %0 tile_sizes [%1, %1, 1]
|
||||
: (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
-> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
@@ -194,7 +194,7 @@ module {
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loop = transform.structured.tile_using_for %0 [[4]] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%1, %loop = transform.structured.tile_using_for %0 tile_sizes [[4]] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -230,7 +230,7 @@ func.func @scalable_and_fixed_length_tile(
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 [4, 4, [4]] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 tile_sizes [4, 4, [4]] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -249,7 +249,7 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
// expected-error @below {{too many tiles provided, expected at most 3 found 4}}
|
||||
%1, %loops = transform.structured.tile_using_for %0 [1, 0, 0, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%1, %loops = transform.structured.tile_using_for %0 tile_sizes [1, 0, 0, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ transform.sequence failures(propagate) {
|
||||
transform.sequence failures(propagate) {
|
||||
^bb0(%arg0: !transform.any_op):
|
||||
%0 = transform.param.constant 2 : i64 -> !transform.param<i64>
|
||||
// expected-error@below {{custom op 'transform.structured.vectorize' expected 2 operand type(s)}}
|
||||
// expected-error@below {{custom op 'transform.structured.vectorize' 1 operands present, but expected 2}}
|
||||
transform.structured.vectorize %arg0 vector_sizes [%0, 2] : !transform.any_op, !transform.param<i64>, !transform.param<i64>
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
transform.sequence failures(propagate) {
|
||||
^bb1(%arg0: !transform.any_op):
|
||||
// CHECK %{{.*}}, %{{.*}}:2 = transform.structured.tile
|
||||
%0, %1:2 = transform.structured.tile_using_for %arg0 [2, 0, 3] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%0, %1:2 = transform.structured.tile_using_for %arg0 tile_sizes [2, 0, 3] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
}
|
||||
|
||||
// check that the Attributes of `tile_using_for` are preserved through printing
|
||||
@@ -11,9 +11,9 @@ transform.sequence failures(propagate) {
|
||||
transform.sequence failures(propagate) {
|
||||
^bb1(%arg0: !transform.any_op):
|
||||
// CHECK %{{.*}}, %{{.*}}:2 = transform.structured.tile %arg0 [2, 0, 3] interchange = [2, 1] {test_attr1 = 1 : i64, test_attr2}
|
||||
%0, %1:2 = transform.structured.tile_using_for %arg0 [2, 0, 3] interchange = [2, 1] {test_attr1 = 1 : i64, test_attr2}: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%0, %1:2 = transform.structured.tile_using_for %arg0 tile_sizes [2, 0, 3] interchange = [2, 1] {test_attr1 = 1 : i64, test_attr2}: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
// CHECK %{{.*}}, %{{.*}}:2 = transform.structured.tile %arg0 [4, 5, 3] {test_attr3 = 1 : i64, test_attr4}
|
||||
%2, %3:2 = transform.structured.tile_using_for %0 [0, 5, 3] {test_attr3 = 1 : i64, test_attr4}: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%2, %3:2 = transform.structured.tile_using_for %0 tile_sizes [0, 5, 3] {test_attr3 = 1 : i64, test_attr4}: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
}
|
||||
|
||||
transform.sequence failures(propagate) {
|
||||
|
||||
@@ -12,7 +12,7 @@ func.func @dot(%x: memref<?xf32, strided<[1], offset: ?>>,
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.dot"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loop = transform.structured.tile_using_for %0 [8000] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%1, %loop = transform.structured.tile_using_for %0 tile_sizes [8000] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ func.func @matvec(%A: memref<?x?xf32, strided<[?, 1], offset: ?>>,
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.matvec"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 [5, 6] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 tile_sizes [5, 6] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -67,10 +67,10 @@ func.func @matmul(%A: memref<?x?xf32, strided<[?, 1], offset: ?>>,
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 [2000, 3000, 4000] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%2, %loops_2:3 = transform.structured.tile_using_for %1 [200, 300, 400] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%3, %loops_3:3 = transform.structured.tile_using_for %2 [20, 30, 40] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%4, %loops_4:3 = transform.structured.tile_using_for %3 [2, 3, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 tile_sizes [2000, 3000, 4000] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%2, %loops_2:3 = transform.structured.tile_using_for %1 tile_sizes [200, 300, 400] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%3, %loops_3:3 = transform.structured.tile_using_for %2 tile_sizes [20, 30, 40] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%4, %loops_4:3 = transform.structured.tile_using_for %3 tile_sizes [2, 3, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -170,7 +170,7 @@ func.func @matvec_perm(%A: memref<?x?xf32, strided<[?, 1], offset: ?>>,
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.matvec"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 [5, 6] interchange = [1, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 tile_sizes [5, 6] interchange = [1, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -199,9 +199,9 @@ func.func @matmul_perm(%A: memref<?x?xf32, strided<[?, 1], offset: ?>>,
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 [2000, 3000, 4000] interchange = [1, 2, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%2, %loops_2:3 = transform.structured.tile_using_for %1 [200, 300, 400] interchange = [1, 0, 2] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%3, %loops_3:3 = transform.structured.tile_using_for %2 [20, 30, 40] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 tile_sizes [2000, 3000, 4000] interchange = [1, 2, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%2, %loops_2:3 = transform.structured.tile_using_for %1 tile_sizes [200, 300, 400] interchange = [1, 0, 2] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%3, %loops_3:3 = transform.structured.tile_using_for %2 tile_sizes [20, 30, 40] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ func.func @masked_static_vectorize_nd_tensor_extract_with_affine_apply_contiguou
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
transform.structured.vectorize %0 vector_sizes [1, 4] vectorize_nd_extract : !transform.any_op
|
||||
transform.structured.vectorize %0 vector_sizes [1, 4] {vectorize_nd_extract} : !transform.any_op
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -85,7 +85,7 @@ func.func @masked_dynamic_vectorize_nd_tensor_extract_with_affine_apply_contiguo
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
transform.structured.vectorize %0 vector_sizes [1, 4] vectorize_nd_extract : !transform.any_op
|
||||
transform.structured.vectorize %0 vector_sizes [1, 4] {vectorize_nd_extract} : !transform.any_op
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -125,7 +125,7 @@ func.func @masked_vectorize_nd_tensor_extract_with_affine_apply_gather(%6: tenso
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
transform.structured.vectorize %0 vector_sizes [1, 4] vectorize_nd_extract : !transform.any_op
|
||||
transform.structured.vectorize %0 vector_sizes [1, 4] {vectorize_nd_extract} : !transform.any_op
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -182,7 +182,7 @@ func.func @masked_dynamic_vectorize_nd_tensor_extract_with_affine_apply_gather(%
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
transform.structured.vectorize %0 vector_sizes [1, 4] vectorize_nd_extract : !transform.any_op
|
||||
transform.structured.vectorize %0 vector_sizes [1, 4] {vectorize_nd_extract} : !transform.any_op
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -234,7 +234,7 @@ func.func @extract_masked_vectorize(%arg0: tensor<?x?xf32>, %arg1: tensor<?x?xf3
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
transform.structured.vectorize %0 vector_sizes [3, 3] vectorize_nd_extract : !transform.any_op
|
||||
transform.structured.vectorize %0 vector_sizes [3, 3] {vectorize_nd_extract} : !transform.any_op
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -279,7 +279,7 @@ func.func @tensor_extract_dynamic_shape(%arg1: tensor<123x321xf32>, %arg2: tenso
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
transform.structured.vectorize %0 vector_sizes [1, 3, 8] vectorize_nd_extract : !transform.any_op
|
||||
transform.structured.vectorize %0 vector_sizes [1, 3, 8] {vectorize_nd_extract} : !transform.any_op
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ func.func @dynamic_pad_tensor_3_4(%input_tensor: tensor<?x?xf32>,
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["tensor.pad"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 [2, 3] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 tile_sizes [2, 3] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -73,7 +73,7 @@ func.func @dynamic_pad_tensor_0_3(%input_tensor: tensor<?x?xf32>,
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["tensor.pad"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loop = transform.structured.tile_using_for %0 [0, 3] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%1, %loop = transform.structured.tile_using_for %0 tile_sizes [0, 3] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -109,7 +109,7 @@ func.func @static_pad_tensor_3_4(%input_tensor: tensor<7x9xf32>,
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["tensor.pad"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 [2, 3] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 tile_sizes [2, 3] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -142,7 +142,7 @@ func.func @static_pad_tensor_0_3(%input_tensor: tensor<7x9xf32>,
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["tensor.pad"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loop = transform.structured.tile_using_for %0 [0, 3] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%1, %loop = transform.structured.tile_using_for %0 tile_sizes [0, 3] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -179,7 +179,7 @@ func.func @static_pad_tile_evenly_0_3(%input_tensor: tensor<7x9xf32>,
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["tensor.pad"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loop = transform.structured.tile_using_for %0 [0, 3] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%1, %loop = transform.structured.tile_using_for %0 tile_sizes [0, 3] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -217,7 +217,7 @@ func.func @NC_to_NCnc(%arg0: tensor<128x256xf32>, %arg1: tensor<4x8x32x32xf32>)
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["tensor.pack"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 [2, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 tile_sizes [2, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -247,7 +247,7 @@ func.func @KC_to_CKkc(%arg0: tensor<128x256xf32>, %arg1: tensor<32x4x32x8xf32>)
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["tensor.pack"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 [2, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 tile_sizes [2, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -284,7 +284,7 @@ func.func @pad_and_pack_static(%input: tensor<13x15xf32>, %output: tensor<2x8x8x
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["tensor.pack"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 [2, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 tile_sizes [2, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -335,7 +335,7 @@ func.func @pad_and_pack_partially_dynamic(%input: tensor<?x?xf32>, %output: tens
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["tensor.pack"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 [2, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 tile_sizes [2, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -391,7 +391,7 @@ func.func @pad_and_pack_fully_dynamic(%source: tensor<?x?xf32>, %dest: tensor<?x
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["tensor.pack"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 [2, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 tile_sizes [2, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -440,7 +440,7 @@ func.func @NCnc_to_NC(%source: tensor<8x8x32x16xf32>, %dest: tensor<256x128xf32>
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["tensor.unpack"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 [2, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 tile_sizes [2, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -488,7 +488,7 @@ func.func @CKkc_to_KC(%source: tensor<32x4x32x8xf32>, %dest: tensor<128x256xf32>
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["tensor.unpack"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 [2, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 tile_sizes [2, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -526,7 +526,7 @@ func.func @perfect_CKkc_to_KC(%source: tensor<32x4x2x4xf32>, %dest: tensor<8x128
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["tensor.unpack"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 [2, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 tile_sizes [2, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -570,7 +570,7 @@ func.func @dynamic_perfect_CKkc_to_KC(%source: tensor<?x?x2x2xf32>, %dest: tenso
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["tensor.unpack"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 [2, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 tile_sizes [2, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -607,7 +607,7 @@ func.func @perfect_NKPQk_to_NPQK(%source: tensor<1x4x6x6x2xf32>, %dest: tensor<1
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["tensor.unpack"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:4 = transform.structured.tile_using_for %0 [1, 1, 1, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:4 = transform.structured.tile_using_for %0 tile_sizes [1, 1, 1, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -635,7 +635,7 @@ func.func @fully_dynamic_unpack(%source: tensor<?x?x?x?xf32>, %dest: tensor<?x?x
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["tensor.unpack"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 [4, 8] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 tile_sizes [4, 8] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
@@ -671,7 +671,7 @@ func.func @perfect_NPQK_to_NKPQk(%source: tensor<1x6x6x8xf32>, %dest: tensor<1x4
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["tensor.pack"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:4 = transform.structured.tile_using_for %0 [1, 1, 1, 1] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:4 = transform.structured.tile_using_for %0 tile_sizes [1, 1, 1, 1] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,19 +101,19 @@ transform.sequence failures(propagate) {
|
||||
}
|
||||
|
||||
// CHECK: transform.sequence
|
||||
// CHECK: transform.structured.tile_using_for %0[4, 4, [4]]
|
||||
// CHECK: transform.structured.tile_using_for %0 tile_sizes [4, 4, [4]]
|
||||
transform.sequence failures(propagate) {
|
||||
^bb0(%arg1: !transform.any_op):
|
||||
%0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
transform.structured.tile_using_for %0 [4, 4, [4]] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.structured.tile_using_for %0 tile_sizes [4, 4, [4]] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
}
|
||||
|
||||
// CHECK: transform.sequence
|
||||
// CHECK: transform.structured.tile_using_for %0{{\[}}[2], 4, 8]
|
||||
// CHECK: transform.structured.tile_using_for %0 tile_sizes {{\[}}[2], 4, 8]
|
||||
transform.sequence failures(propagate) {
|
||||
^bb0(%arg1: !transform.any_op):
|
||||
%0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
transform.structured.tile_using_for %0 [[2], 4, 8] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.structured.tile_using_for %0 tile_sizes [[2], 4, 8] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
}
|
||||
|
||||
// CHECK: transform.sequence
|
||||
|
||||
@@ -79,7 +79,7 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.sequence %arg0 : !transform.any_op failures(propagate) {
|
||||
^bb1(%arg1: !transform.any_op):
|
||||
%0 = pdl_match @pdl_target_attrA in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
transform.structured.tile_using_for %0 [4, 4, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.structured.tile_using_for %0 tile_sizes [4, 4, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1 = pdl_match @pdl_target_attrC in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%2 = get_parent_op %1 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
|
||||
transform.structured.vectorize_children_and_apply_patterns %2 : (!transform.any_op) -> !transform.any_op
|
||||
|
||||
@@ -16,7 +16,7 @@ func.func @matmul_tensors(
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%module_op: !transform.any_op {transform.consumed}) {
|
||||
%0 = transform.structured.match ops{["linalg.matmul"]} in %module_op : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 [8, 4, 2]
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 tile_sizes [8, 4, 2]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%2 = transform.get_parent_op %1 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
|
||||
transform.structured.vectorize_children_and_apply_patterns %2 : (!transform.any_op) -> !transform.any_op
|
||||
|
||||
@@ -61,7 +61,7 @@ module attributes {transform.with_named_sequence} {
|
||||
|
||||
// Step 1: Tile for size [4] x [4], which corresponds to SVLs x SVLs, where
|
||||
// SVLs is the number of 32-bit elements in a vector of SVL bits.
|
||||
%tiled_linalg_op, %loops:3 = transform.structured.tile_using_for %matmul_transpose_a[[4], [4], 1]
|
||||
%tiled_linalg_op, %loops:3 = transform.structured.tile_using_for %matmul_transpose_a tile_sizes [[4], [4], 1]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
|
||||
// Step 2: Vectorize.
|
||||
|
||||
@@ -59,7 +59,7 @@ module attributes {transform.with_named_sequence} {
|
||||
|
||||
// Step 1: Tile for size [4] x [4], which corresponds to SVLs x SVLs, where
|
||||
// SVLs is the number of 32-bit elements in a vector of SVL bits.
|
||||
%tiled_linalg_op, %loops:3 = transform.structured.tile_using_for %matmul[[4], [4], 1]
|
||||
%tiled_linalg_op, %loops:3 = transform.structured.tile_using_for %matmul tile_sizes [[4], [4], 1]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
|
||||
// Step 2: Vectorize.
|
||||
|
||||
@@ -84,7 +84,7 @@ module attributes {transform.with_named_sequence} {
|
||||
// Step 1: Tile for size [8] x [8] (unrolled by 4), which corresponds to
|
||||
// (2 x SVLs) x (2 x SVLs), where SVLs is the number of 32-bit elements in a
|
||||
// vector of SVL bits. This uses all four 32-bit SME virtual tiles.
|
||||
%tiled_linalg_op, %loop_i, %loop_j, %loop_k = transform.structured.tile_using_for %matmul[[8], [8], 4]
|
||||
%tiled_linalg_op, %loop_i, %loop_j, %loop_k = transform.structured.tile_using_for %matmul tile_sizes [[8], [8], 4]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.op<"scf.for">, !transform.op<"scf.for">, !transform.op<"scf.for">)
|
||||
|
||||
// Step 2: Vectorize.
|
||||
|
||||
@@ -72,7 +72,7 @@ module attributes {transform.with_named_sequence} {
|
||||
// Step 1: Tile for size [8] x [8] (unrolled by 4), which corresponds to
|
||||
// (2 x SVLs) x (2 x SVLs), where SVLs is the number of 32-bit elements in a
|
||||
// vector of SVL bits. This uses all four 32-bit SME virtual tiles.
|
||||
%tiled_linalg_op, %loop_i, %loop_j, %loop_k = transform.structured.tile_using_for %matmul[[8], [8], 4]
|
||||
%tiled_linalg_op, %loop_i, %loop_j, %loop_k = transform.structured.tile_using_for %matmul tile_sizes [[8], [8], 4]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.op<"scf.for">, !transform.op<"scf.for">, !transform.op<"scf.for">)
|
||||
|
||||
// Step 2: Vectorize.
|
||||
|
||||
@@ -96,7 +96,7 @@ module attributes {transform.with_named_sequence} {
|
||||
: (!transform.op<"func.func">) -> !transform.any_op
|
||||
|
||||
// Step 1: Tile
|
||||
%tiled_matmul, %loops:3 = transform.structured.tile_using_for %matmul [2, [4], 1]
|
||||
%tiled_matmul, %loops:3 = transform.structured.tile_using_for %matmul tile_sizes [2, [4], 1]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
|
||||
// Step 2: Vectorize
|
||||
|
||||
@@ -70,10 +70,10 @@ module @transforms attributes { transform.with_named_sequence } {
|
||||
|
||||
// Step 1: Tile
|
||||
// Tile parallel dims
|
||||
%tiled_linalg_op_p, %loops:4 = transform.structured.tile_using_for %mmt4d[1, 1, 0, 3, 3, 0]
|
||||
%tiled_linalg_op_p, %loops:4 = transform.structured.tile_using_for %mmt4d tile_sizes [1, 1, 0, 3, 3, 0]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
// Tile reduction dims
|
||||
%tiled_linalg_op_r, %loops2:2 = transform.structured.tile_using_for %tiled_linalg_op_p[0, 0, 1, 0, 0, 1]
|
||||
%tiled_linalg_op_r, %loops2:2 = transform.structured.tile_using_for %tiled_linalg_op_p tile_sizes [0, 0, 1, 0, 0, 1]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
|
||||
// Step 2: Vectorize
|
||||
|
||||
@@ -107,10 +107,10 @@ module @transforms attributes { transform.with_named_sequence } {
|
||||
|
||||
// Step 1: Tile
|
||||
// Tile parallel dims
|
||||
%tiled_linalg_op_p, %loops:4 = transform.structured.tile_using_for %mmt4d[1, 1, 0, 8, 8, 0]
|
||||
%tiled_linalg_op_p, %loops:4 = transform.structured.tile_using_for %mmt4d tile_sizes [1, 1, 0, 8, 8, 0]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
// Tile reduction dims
|
||||
%tiled_linalg_op_r, %loops2:2 = transform.structured.tile_using_for %tiled_linalg_op_p[0, 0, 1, 0, 0, 1]
|
||||
%tiled_linalg_op_r, %loops2:2 = transform.structured.tile_using_for %tiled_linalg_op_p tile_sizes [0, 0, 1, 0, 0, 1]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
|
||||
// Step 2: Vectorize
|
||||
|
||||
@@ -27,7 +27,7 @@ func.func @conv_1d(%arg0: memref<?xf32>, %arg1: memref<?xf32>, %arg2: memref<?xf
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.conv_1d"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loop = transform.structured.tile_using_for %0 [4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
%1, %loop = transform.structured.tile_using_for %0 tile_sizes [4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ func.func @conv_1d_nwc_wcf(%arg0: memref<?x?x?xf32>, %arg1: memref<?x?x?xf32>, %
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.conv_1d_nwc_wcf"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 [2, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 tile_sizes [2, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ func.func @conv_2d(%arg0: memref<?x?xf32>, %arg1: memref<?x?xf32>, %arg2: memref
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.conv_2d"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 [2, 2] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:2 = transform.structured.tile_using_for %0 tile_sizes [2, 2] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ func.func @conv_2d_nhwc_hwcf(%arg0: memref<?x?x?x?xf32>, %arg1: memref<?x?x?x?xf
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.conv_2d_nhwc_hwcf"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:4 = transform.structured.tile_using_for %0 [2, 3, 3, 2] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:4 = transform.structured.tile_using_for %0 tile_sizes [2, 3, 3, 2] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ func.func @conv_3d(%arg0: memref<?x?x?xf32>, %arg1: memref<?x?x?xf32>, %arg2: me
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.conv_3d"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 [2, 2, 2] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 tile_sizes [2, 2, 2] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ func.func @conv_3d_ndhwc_dhwcf(%arg0: memref<?x?x?x?x?xf32>, %arg1: memref<?x?x?
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.conv_3d_ndhwc_dhwcf"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 [0, 5, 5, 5] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 tile_sizes [0, 5, 5, 5] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ func.func @main() {
|
||||
module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) {
|
||||
%0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 [1, 2, 3] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
%1, %loops:3 = transform.structured.tile_using_for %0 tile_sizes [1, 2, 3] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1 : !transform.any_op {transform.readonly}) {
|
||||
%pad = transform.structured.match ops{["tensor.pad"]} in %arg1
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
%a, %b, %c = transform.structured.tile_using_for %pad [2, 3]
|
||||
%a, %b, %c = transform.structured.tile_using_for %pad tile_sizes [2, 3]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
@@ -57,7 +57,7 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1 : !transform.any_op {transform.readonly}) {
|
||||
%pad = transform.structured.match ops{["tensor.pad"]} in %arg1
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
%a, %b = transform.structured.tile_using_for %pad [0, 3]
|
||||
%a, %b = transform.structured.tile_using_for %pad tile_sizes [0, 3]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
@@ -97,7 +97,7 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1 : !transform.any_op {transform.readonly}) {
|
||||
%pad = transform.structured.match ops{["tensor.pad"]} in %arg1
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
%a, %b, %c = transform.structured.tile_using_for %pad [2, 3]
|
||||
%a, %b, %c = transform.structured.tile_using_for %pad tile_sizes [2, 3]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
@@ -134,7 +134,7 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1 : !transform.any_op {transform.readonly}) {
|
||||
%pad = transform.structured.match ops{["tensor.pad"]} in %arg1
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
%a, %b = transform.structured.tile_using_for %pad [0, 3]
|
||||
%a, %b = transform.structured.tile_using_for %pad tile_sizes [0, 3]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
@@ -170,7 +170,7 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1 : !transform.any_op {transform.readonly}) {
|
||||
%pad = transform.structured.match ops{["tensor.pad"]} in %arg1
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
%a, %b, %c = transform.structured.tile_using_for %pad [2, 3]
|
||||
%a, %b, %c = transform.structured.tile_using_for %pad tile_sizes [2, 3]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
@@ -192,7 +192,7 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1 : !transform.any_op {transform.readonly}) {
|
||||
%pad = transform.structured.match ops{["tensor.pad"]} in %arg1
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
%a, %b = transform.structured.tile_using_for %pad [0, 3]
|
||||
%a, %b = transform.structured.tile_using_for %pad tile_sizes [0, 3]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1 : !transform.any_op {transform.readonly}) {
|
||||
%matmul = transform.structured.match ops{["linalg.matmul"]} in %arg1
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
%a, %b, %c = transform.structured.tile_using_for %matmul [10, 20]
|
||||
%a, %b, %c = transform.structured.tile_using_for %matmul tile_sizes [10, 20]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
@@ -63,7 +63,7 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1 : !transform.any_op {transform.readonly}) {
|
||||
%matmul = transform.structured.match ops{["linalg.matmul"]} in %arg1
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
%a, %b, %c, %d = transform.structured.tile_using_for %matmul [10, 20, 30]
|
||||
%a, %b, %c, %d = transform.structured.tile_using_for %matmul tile_sizes [10, 20, 30]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
@@ -122,7 +122,7 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1 : !transform.any_op {transform.readonly}) {
|
||||
%generic = transform.structured.match ops{["linalg.generic"]} in %arg1
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
%a, %b, %c = transform.structured.tile_using_for %generic [10, 0, 20]
|
||||
%a, %b, %c = transform.structured.tile_using_for %generic tile_sizes [10, 0, 20]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
@@ -175,7 +175,7 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1 : !transform.any_op {transform.readonly}) {
|
||||
%conv = transform.structured.match ops{["linalg.conv_2d_nhwc_hwcf"]} in %arg1
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
%a, %b, %c, %d = transform.structured.tile_using_for %conv [0, 0, 0, 0, 10, 20, 30]
|
||||
%a, %b, %c, %d = transform.structured.tile_using_for %conv tile_sizes [0, 0, 0, 0, 10, 20, 30]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
@@ -254,7 +254,7 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1 : !transform.any_op {transform.readonly}) {
|
||||
%generic = transform.structured.match ops{["linalg.generic"]} in %arg1
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
%a, %b, %c = transform.structured.tile_using_for %generic [10, 20]
|
||||
%a, %b, %c = transform.structured.tile_using_for %generic tile_sizes [10, 20]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
@@ -282,7 +282,7 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1 : !transform.any_op {transform.readonly}) {
|
||||
%matmul = transform.structured.match ops{["linalg.matmul"]} in %arg1
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
%a, %b, %c, %d = transform.structured.tile_using_for %matmul [10, 20, 30] interchange = [1, 2, 0]
|
||||
%a, %b, %c, %d = transform.structured.tile_using_for %matmul tile_sizes [10, 20, 30] interchange = [1, 2, 0]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
@@ -338,7 +338,7 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1 : !transform.any_op {transform.readonly}) {
|
||||
%copy = transform.structured.match ops{["linalg.copy"]} in %arg1
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
%a, %b, %c = transform.structured.tile_using_for %copy [10, 20]
|
||||
%a, %b, %c = transform.structured.tile_using_for %copy tile_sizes [10, 20]
|
||||
: (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
@@ -369,7 +369,7 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1 : !transform.any_op {transform.readonly}) {
|
||||
%generic = transform.structured.match ops{["linalg.generic"]} in %arg1
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
%a = transform.structured.tile_using_for %generic []
|
||||
%a = transform.structured.tile_using_for %generic tile_sizes []
|
||||
: (!transform.any_op) -> (!transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
@@ -396,7 +396,7 @@ module attributes {transform.with_named_sequence} {
|
||||
transform.named_sequence @__transform_main(%arg1 : !transform.any_op {transform.readonly}) {
|
||||
%generic = transform.structured.match ops{["linalg.generic"]} in %arg1
|
||||
: (!transform.any_op) -> !transform.any_op
|
||||
%a = transform.structured.tile_using_for %generic []
|
||||
%a = transform.structured.tile_using_for %generic tile_sizes []
|
||||
: (!transform.any_op) -> (!transform.any_op)
|
||||
transform.yield
|
||||
}
|
||||
|
||||
@@ -501,7 +501,7 @@ def testTileToForallMixedDynamic(target):
|
||||
structured.TileUsingForallOp(target, num_threads=[n, 3, 4])
|
||||
# CHECK-LABEL: TEST: testTileToForallMixedDynamic
|
||||
# CHECK: = transform.structured.tile_using_forall
|
||||
# CHECK-SAME: num_threads [%{{.*}} : !transform.any_op, 3, 4]
|
||||
# CHECK-SAME: num_threads [%{{.*}}, 3, 4] : (!transform.any_op, !transform.any_op)
|
||||
|
||||
|
||||
@run
|
||||
@@ -511,7 +511,7 @@ def testTileToForallPackedDynamic(target):
|
||||
structured.TileUsingForallOp(target, num_threads=n)
|
||||
# CHECK-LABEL: TEST: testTileToForallPackedDynamic
|
||||
# CHECK: = transform.structured.tile_using_forall
|
||||
# CHECK-SAME: num_threads *(%0 : !transform.any_op)
|
||||
# CHECK-SAME: num_threads *(%0) : (!transform.any_op, !transform.any_op)
|
||||
|
||||
|
||||
@run
|
||||
|
||||
Reference in New Issue
Block a user