[all-commits] [llvm/llvm-project] eb1d50: [MLIR][Vector] Refactor tests for contract -> OP t...

Andrzej Warzyński via All-commits all-commits at lists.llvm.org
Tue Nov 28 07:02:25 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: eb1d5065c560b3468fa0d34af3103359cd78c088
      https://github.com/llvm/llvm-project/commit/eb1d5065c560b3468fa0d34af3103359cd78c088
  Author: Andrzej Warzyński <andrzej.warzynski at arm.com>
  Date:   2023-11-28 (Tue, 28 Nov 2023)

  Changed paths:
    M mlir/test/Dialect/Vector/vector-contract-to-outerproduct-matvec-transforms.mlir

  Log Message:
  -----------
  [MLIR][Vector] Refactor tests for contract -> OP transforms (2/N) (#73445)

This is a direct follow-up of #73348. The matvec trait that's used for
`@matvec_m_mk_k` was incorrectly updated from:

```
#redpar_vecmattrans_accesses = [
  affine_map<(m, k) -> (m)>,
  affine_map<(m, k) -> (m, k)>,
  affine_map<(m, k) -> (k)>
]
  indexing_maps = #redpar_vecmattrans_accesses,
  iterator_types = ["reduction", "parallel"]
}
```

to:

```
#matvec_accesses_4 = [
  affine_map<(m, k) -> (k)>,
  affine_map<(m, k) -> (k, m)>,
  affine_map<(m, k) -> (m)>
]
  indexing_maps = #matvec_accesses_4,
  iterator_types = ["parallel", "reduction"]
}
```

Note that these traits describe identical matvec operation, hence the
`CHECK` lines are identical for both.

Also, `#redpar_vecmattrans_trait` is identical to `#matvec_trait_8`
that's already present in:

   * "vector-contract-to-outerproduct-matvec-transforms.mlir"

For this reason:
* `@matvec_m_mk_k` is moved near other tests that already use
`#matvec_trait_8`,
  * `#redpar_vecmattrans_trait` is replaced `#matvec_trait_8`.

This is a part of a larger effort to add cases with scalable vectors to
tests for the Vector dialect. I am refactoring these tests so that it's
easier to identify what cases are tested and where to add tests for
scalable vectors.

Implements #72834.




More information about the All-commits mailing list