[all-commits] [llvm/llvm-project] c38a0d: [mlir][nfc] Update vectorize-tensor-extract.mlir (...
Andrzej Warzyński via All-commits
all-commits at lists.llvm.org
Tue Dec 10 23:46:25 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c38a0de6915592cf488965a995d8aa6e7783adcd
https://github.com/llvm/llvm-project/commit/c38a0de6915592cf488965a995d8aa6e7783adcd
Author: Andrzej Warzyński <andrzej.warzynski at arm.com>
Date: 2024-12-11 (Wed, 11 Dec 2024)
Changed paths:
M mlir/test/Dialect/Linalg/vectorize-tensor-extract.mlir
Log Message:
-----------
[mlir][nfc] Update vectorize-tensor-extract.mlir (1/N) (#118977)
Tests in "vectorize-tensor-extract.mlir" are inconsistent and would
benefit from refactoring to:
* Clearly categorize tests into "contiguous load," "gather load," and
"scalar load + broadcast" cases, reflecting the structure of
tensor.extract vectorization.
* Unify variable naming (both MLIR and FileCheck).
* Ensure all tests exercise unmasked vectorization (masked vectorization
is covered in "vectorize-tensor-extract-masked.mlir").
* Improve and standardize formatting.
These changes will make it easier to identify the test cases being
exercised and simplify future maintenance or refactoring.
This is patch 1/N in the series; below is a summary of the specific
changes
in this patch.
----------------------------------------------------------------------
Summary for patch 1/N
----------------------------------------------------------------------
This PR updates the `@vectorize_scalar_broadcast_column_tensor` test in
"vectorize-tensor-extract.mlir", which exercises:
* Vectorization of tensor.extract.
* A scalar read followed by a broadcast.
* Reading from a constant column tensor.
Currently, the test uses "masked" vectorization, but the file
exclusively tests unmasked vectorization paths. To address this
inconsistency, this PR removes masking, aligning the test with the rest
of the file. Masked vectorization scenarios remain covered in
"vectorize-tensor-extract-masked.mlir". This update switches from:
* `transform.structured.vectorize`, to
* `transform.structured.vectorize_children_and_apply_patterns`.
The latter approach applies canonicalization patterns, significantly
simplifying the generated output.
Additional improvements for readability:
* Renamed the test function for clarity.
* Updated variable names and removed unused variables.
* Added empty lines for better formatting.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list