MLIR-AIE
AIEXDialect.h
Go to the documentation of this file.
1//===- AIEDialect.h ---------------------------------------------*- C++ -*-===//
2//
3// This file is licensed under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7// (c) Copyright 2019 Xilinx Inc.
8//
9//===----------------------------------------------------------------------===//
10
11#ifndef MLIR_AIEX_DIALECT_H
12#define MLIR_AIEX_DIALECT_H
13
15
16#include "mlir/IR/BuiltinAttributes.h"
17
18// Include dialect declarations such as parseAttributes, parseType
19#include "aie/Dialect/AIEX/IR/AIEXDialect.h.inc"
20#include "mlir/IR/Operation.h"
21
22// include TableGen generated Op definitions
23#define GET_OP_CLASSES
24#include "aie/Dialect/AIEX/IR/AIEX.h.inc"
25
26#define GET_TYPEDEF_CLASSES
27#include "aie/Dialect/AIEX/IR/AIEXTypes.h.inc"
28
29#include "llvm/ADT/StringRef.h"
30
31#include <optional>
32
33namespace xilinx {
34namespace AIEX {
35
36void getHardwareStridesWraps(const AIE::AIETargetModel &targetModel,
37 mlir::Operation *op,
38 mlir::BaseMemRefType referencedBufType,
39 llvm::SmallVector<int64_t, 4> inputSizes,
40 llvm::SmallVector<int64_t, 4> inputStrides,
41 llvm::SmallVector<int64_t, 4> &sizes,
42 llvm::SmallVector<int64_t, 4> &strides);
43mlir::LogicalResult
44verifyStridesWraps(mlir::Operation *forOp,
45 mlir::BaseMemRefType referencedBufType, int tileCol,
46 int tileRow, llvm::SmallVector<int64_t, 4> inputSizes,
47 llvm::SmallVector<int64_t, 4> inputStrides,
48 llvm::SmallVector<int64_t, 4> hardwareSizes,
49 llvm::SmallVector<int64_t, 4> hardwareStrides,
50 bool skipTransformationChecks = false);
51bool isLinearTransfer(llvm::ArrayRef<int64_t> sizes,
52 llvm::ArrayRef<int64_t> strides);
53
54} // namespace AIEX
55} // namespace xilinx
56
57#endif
void getHardwareStridesWraps(const AIE::AIETargetModel &targetModel, mlir::Operation *op, mlir::BaseMemRefType referencedBufType, llvm::SmallVector< int64_t, 4 > inputSizes, llvm::SmallVector< int64_t, 4 > inputStrides, llvm::SmallVector< int64_t, 4 > &sizes, llvm::SmallVector< int64_t, 4 > &strides)
mlir::LogicalResult verifyStridesWraps(mlir::Operation *forOp, mlir::BaseMemRefType referencedBufType, int tileCol, int tileRow, llvm::SmallVector< int64_t, 4 > inputSizes, llvm::SmallVector< int64_t, 4 > inputStrides, llvm::SmallVector< int64_t, 4 > hardwareSizes, llvm::SmallVector< int64_t, 4 > hardwareStrides, bool skipTransformationChecks=false)
bool isLinearTransfer(llvm::ArrayRef< int64_t > sizes, llvm::ArrayRef< int64_t > strides)