MLIR
17.0.0git
|
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/Dialect/Vector/IR/VectorOps.h"
#include "mlir/Dialect/X86Vector/Transforms.h"
#include "mlir/IR/ImplicitLocOpBuilder.h"
#include "mlir/IR/Matchers.h"
#include "mlir/IR/PatternMatch.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/FormatVariadic.h"
Go to the source code of this file.
Classes | |
class | TransposeOpLowering |
Rewrite AVX2-specific vector.transpose, for the supported cases and depending on the TransposeLoweringOptions . More... | |
Functions | |
static bool | areDimsTransposedIn2DSlice (int64_t dim0, int64_t dim1, ArrayRef< int64_t > transp) |
Given the n-D transpose pattern 'transp', return true if 'dim0' and 'dim1' should be transposed with each other within the context of their 2D transposition slice. More... | |
|
static |
Given the n-D transpose pattern 'transp', return true if 'dim0' and 'dim1' should be transposed with each other within the context of their 2D transposition slice.
Example 1: dim0 = 0, dim1 = 2, transp = [2, 1, 0] Return true: dim0 and dim1 are transposed within the context of their 2D transposition slice ([1, 0]).
Example 2: dim0 = 0, dim1 = 1, transp = [2, 1, 0] Return true: dim0 and dim1 are transposed within the context of their 2D transposition slice ([1, 0]). Paradoxically, note how dim1 (1) is not transposed within the full context of the transposition.
Example 3: dim0 = 0, dim1 = 1, transp = [2, 0, 1] Return false: dim0 and dim1 are not transposed within the context of their 2D transposition slice ([0, 1]). Paradoxically, note how dim0 (0) and dim1 (1) are transposed within the full context of the of the transposition.
Definition at line 208 of file AVXTranspose.cpp.
Referenced by TransposeOpLowering::matchAndRewrite().