Skip to content

Commit 42a1632

Browse files
committed
Rename test + descriptions
1 parent 69f6aca commit 42a1632

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

mlir/test/Dialect/Linalg/vectorization/contraction-named.mlir renamed to mlir/test/Dialect/Linalg/vectorization/contraction-interface.mlir

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
// RUN: mlir-opt %s -transform-interpreter -split-input-file | FileCheck %s
22

3+
///----------------------------------------------------------------------------------------
4+
/// Tests for vectorizing operations implementing contraction op interface.
5+
/// Ops implementing the contraction interface are vectorized directly to their
6+
/// vector dialect named counterparts.
7+
///----------------------------------------------------------------------------------------
8+
39
func.func @matmul(%A: tensor<8x4xf32>, %B: tensor<4x16xf32>,
410
%C: tensor<8x16xf32>) -> tensor<8x16xf32> {
511
%0 = linalg.matmul
@@ -208,6 +214,12 @@ module attributes {transform.with_named_sequence} {
208214

209215
// -----
210216

217+
/// Contractions' arbitrarty broadcasts are not supported in contraction interface
218+
/// vectorization.
219+
/// Dimension broadcasts are expected to be decomposed first which removes ambiguity
220+
/// caused by possible variants of dimensions materialization.
221+
/// For example, whether the below target LHS input layout is (m, k) or (k, m).
222+
211223
func.func @negative_matmul_broadcast(%A: tensor<4xf32>, %B: tensor<4x16xf32>,
212224
%C: tensor<8x16xf32>) -> tensor<8x16xf32> {
213225
%0 = linalg.matmul
@@ -368,7 +380,9 @@ module attributes {transform.with_named_sequence} {
368380

369381
// -----
370382

371-
// Generic is currently ignored in direct lowering to a named contraction.
383+
/// Generic can represent contractions but it does not implement contraction interface.
384+
/// Thus, direct lowering to vector.contract is not supported.
385+
/// Vectorization still works and applies generic rewrite logic.
372386

373387
func.func @negative_generic(%A: tensor<8x4xf32>, %B: tensor<4x16xf32>,
374388
%C: tensor<8x16xf32>) -> tensor<8x16xf32> {

0 commit comments

Comments
 (0)