From 9a38bd5ffe9fab4cc799b3348d23eb636260d690 Mon Sep 17 00:00:00 2001 From: Joren Dumoulin Date: Tue, 23 Jul 2024 09:32:18 +0200 Subject: [PATCH] also include them in the convert-linalg-to-memref-stream pass --- .../transforms/convert_linalg_to_memref_stream.mlir | 8 ++++++-- xdsl/transforms/convert_linalg_to_memref_stream.py | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/filecheck/transforms/convert_linalg_to_memref_stream.mlir b/tests/filecheck/transforms/convert_linalg_to_memref_stream.mlir index 48833cc083..87a5c9a204 100644 --- a/tests/filecheck/transforms/convert_linalg_to_memref_stream.mlir +++ b/tests/filecheck/transforms/convert_linalg_to_memref_stream.mlir @@ -15,7 +15,9 @@ linalg.generic { affine_map<() -> ()>, affine_map<() -> ()> ], - iterator_types = [] + iterator_types = [], + doc = "documentation string", + library_call = "library call" } ins(%A, %B : memref, memref) outs(%C : memref) { ^0(%a : f64, %b : f64, %acc_old : f64): %prod = arith.mulf %a, %b : f64 @@ -29,7 +31,9 @@ linalg.generic { // CHECK-NEXT: affine_map<() -> ()>, // CHECK-NEXT: affine_map<() -> ()> // CHECK-NEXT: ], -// CHECK-NEXT: iterator_types = [] +// CHECK-NEXT: iterator_types = [], +// CHECK-NEXT: doc = "documentation string", +// CHECK-NEXT: library_call = "library call" // CHECK-NEXT: } ins(%A, %B : memref, memref) outs(%C : memref) { // CHECK-NEXT: ^0(%a : f64, %b : f64, %acc_old : f64): // CHECK-NEXT: %prod = arith.mulf %a, %b : f64 diff --git a/xdsl/transforms/convert_linalg_to_memref_stream.py b/xdsl/transforms/convert_linalg_to_memref_stream.py index 80a5939071..f7d9cac483 100644 --- a/xdsl/transforms/convert_linalg_to_memref_stream.py +++ b/xdsl/transforms/convert_linalg_to_memref_stream.py @@ -49,6 +49,8 @@ def match_and_rewrite(self, op: linalg.Generic, rewriter: PatternRewriter) -> No iterator_types, bounds, ArrayAttr(()), + op.doc, + op.library_call, ) )