brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.5 KiB · 06a89fc Raw
70 lines · plain
1// RUN: mlir-opt %s --split-input-file | mlir-opt | FileCheck %s2 3transform.sequence failures(propagate) {4^bb1(%arg0: !transform.any_op):5  // CHECK: %{{.*}}, %{{.*}}:2 = transform.structured.tile6  %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)7}8 9// check that the Attributes of `tile_using_for` are preserved through printing10// and parsing with and without use of the optional `interchange` Attribute.11transform.sequence failures(propagate) {12^bb1(%arg0: !transform.any_op):13  // CHECK: %{{.*}}, %{{.*}}:2 = transform.structured.tile_using_for %arg0 tile_sizes [2, 0, 3] interchange = [2, 1] {test_attr1 = 1 : i64, test_attr2}14  %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)15  // CHECK: %{{.*}}, %{{.*}}:2 = transform.structured.tile_using_for %tiled_linalg_op tile_sizes [0, 5, 3] {test_attr3 = 1 : i64, test_attr4}16  %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)17}18 19transform.sequence failures(propagate) {20^bb1(%arg0: !transform.any_op):21  %t = transform.structured.split %arg0 after 42 { dimension = 0 } : !transform.any_op22  %0:2 = transform.split_handle %t : (!transform.any_op) -> (!transform.any_op, !transform.any_op)23  transform.structured.split %0#0 after %0#1 { dimension = 1 } : !transform.any_op, !transform.any_op24}25 26//===----------------------------------------------------------------------===//27// Check that operations are registered correctly through the extension28// mechanism. Their syntax is generated and requires no additional testing since29// we test the generator.30//===----------------------------------------------------------------------===//31 32transform.sequence failures(propagate) {33^bb1(%arg0: !transform.any_op):34  // CHECK: transform.structured.pad35  %0, %1, %2 = transform.structured.pad %arg0 : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)36}37 38transform.sequence failures(propagate) {39^bb1(%arg0: !transform.any_op):40  // CHECK: transform.structured.interchange41  %0 = transform.structured.interchange %arg0 : (!transform.any_op) -> !transform.any_op42}43 44transform.sequence failures(propagate) {45^bb1(%arg0: !transform.any_op):46  // CHECK: transform.structured.scalarize47  %0 = transform.structured.scalarize %arg0 : (!transform.any_op) -> !transform.any_op48}49 50// Check that the second argument of `fuse_into_containing_op` is not consumed51// (if it had been, we would have seen a diagnostic about multiple consumers).52transform.sequence failures(propagate) {53^bb1(%arg0: !transform.any_op, %arg1: !transform.any_op, %arg2: !transform.any_op):54  %loop = transform.structured.match ops{["scf.forall"]} in %arg055    : (!transform.any_op) -> !transform.any_op56  %0:2 = transform.structured.fuse_into_containing_op %arg1 into %loop57    : (!transform.any_op, !transform.any_op) -> (!transform.any_op, !transform.any_op)58  %1:2 = transform.structured.fuse_into_containing_op %arg2 into %loop59    : (!transform.any_op, !transform.any_op) -> (!transform.any_op, !transform.any_op)60}61 62// -----63 64transform.sequence failures(propagate) {65^bb0(%arg0: !transform.any_op):66  // CHECK: transform.structured.vectorize %arg0 : !transform.any_op67  transform.structured.vectorize %arg0 vector_sizes [] : !transform.any_op68 69}70