Skip to content

[mlir][linalg][transform] Add some debug output to vectorization. (NFC) #66520

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

ingomueller-net
Copy link
Contributor

This helps to understand what the problem is when vectorization of structured ops failes due to mismatching vector sizes.

This helps to understand what the problem is when vectorization of
structured ops failes due to mismatching vector sizes.
@llvmbot
Copy link
Member

llvmbot commented Sep 15, 2023

@llvm/pr-subscribers-mlir-linalg
@llvm/pr-subscribers-mlir-core

@llvm/pr-subscribers-mlir

Changes

This helps to understand what the problem is when vectorization of structured ops failes due to mismatching vector sizes.

Full diff: https://github.com/llvm/llvm-project/pull/66520.diff

1 Files Affected:

  • (modified) mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp (+4-1)
diff --git a/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp b/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
index f873bd0e0b68e43..51a83c35e4cda09 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
@@ -924,7 +924,6 @@ getTensorExtractMemoryAccessPattern(tensor::ExtractOp extractOp,
       targetShape.back() == 1)
     return VectorMemoryAccessKind::Gather;
 
-
   // 2. Assume that it's a gather load when reading _from_ a tensor for which
   // the trailing dimension is 1, e.g. `tensor<1x4x1xi32>`.
   // TODO: Relax this condition.
@@ -1484,6 +1483,10 @@ static LogicalResult vectorizeDynamicLinalgOpPrecondition(linalg::LinalgOp op) {
 static LogicalResult
 isValidMaskedInputVector(ArrayRef<int64_t> shape,
                          ArrayRef<int64_t> inputVectorSizes) {
+  LDBG("Iteration space static sizes:");
+  LLVM_DEBUG(llvm::interleaveComma(shape, llvm::dbgs()));
+  LLVM_DEBUG(llvm::dbgs() << "\n");
+
   if (inputVectorSizes.size() != shape.size()) {
     LDBG("Input vector sizes don't match the number of loops");
     return failure();

zero9178 added a commit to zero9178/llvm-project that referenced this pull request Sep 15, 2023
The current regex for the `mlir:core` PR label is too accepting. It uses `**` as a prefix for all paths, which allows any kind of directory prefix to be inserted when matching.
Combined with directory suffices such as `IR` and `Transforms`, it leads to many false positives of being applied to PRs that do not touch MLIR core such as llvm#66520

This PR therefore changes the `mlir:core` labels to only include the specified top-level directories if directly nested under either `lib` for source files, or `include` for header files
zero9178 added a commit that referenced this pull request Sep 15, 2023
The current regex for the `mlir:core` PR label is too accepting. It uses
`**` as a prefix for all paths, which allows any kind of directory
prefix to be inserted when matching. Combined with very common directory
suffixes such as `IR` and `Transforms`, it leads to many false positives
of being applied to PRs that do not touch MLIR core such as
#66520

This PR therefore changes the `mlir:core` labels to only include the
specified top-level directories if directly nested under either `lib`
for source files, or `include` for header files
ZijunZhaoCCK pushed a commit to ZijunZhaoCCK/llvm-project that referenced this pull request Sep 19, 2023
The current regex for the `mlir:core` PR label is too accepting. It uses
`**` as a prefix for all paths, which allows any kind of directory
prefix to be inserted when matching. Combined with very common directory
suffixes such as `IR` and `Transforms`, it leads to many false positives
of being applied to PRs that do not touch MLIR core such as
llvm#66520

This PR therefore changes the `mlir:core` labels to only include the
specified top-level directories if directly nested under either `lib`
for source files, or `include` for header files
@ingomueller-net ingomueller-net changed the title [mlir][linalg][transform] Add some debug output to vectorization. [mlir][linalg][transform] Add some debug output to vectorization. (NFC) Sep 19, 2023
@ingomueller-net ingomueller-net merged commit 159e94a into llvm:main Sep 19, 2023
@ingomueller-net ingomueller-net deleted the transform-vectorize-debug-output branch September 19, 2023 08:34
zahiraam pushed a commit to tahonermann/llvm-project that referenced this pull request Oct 24, 2023
The current regex for the `mlir:core` PR label is too accepting. It uses
`**` as a prefix for all paths, which allows any kind of directory
prefix to be inserted when matching. Combined with very common directory
suffixes such as `IR` and `Transforms`, it leads to many false positives
of being applied to PRs that do not touch MLIR core such as
llvm#66520

This PR therefore changes the `mlir:core` labels to only include the
specified top-level directories if directly nested under either `lib`
for source files, or `include` for header files
zahiraam pushed a commit to tahonermann/llvm-project that referenced this pull request Oct 24, 2023
The current regex for the `mlir:core` PR label is too accepting. It uses
`**` as a prefix for all paths, which allows any kind of directory
prefix to be inserted when matching. Combined with very common directory
suffixes such as `IR` and `Transforms`, it leads to many false positives
of being applied to PRs that do not touch MLIR core such as
llvm#66520

This PR therefore changes the `mlir:core` labels to only include the
specified top-level directories if directly nested under either `lib`
for source files, or `include` for header files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mlir:core MLIR Core Infrastructure mlir:linalg mlir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants