MLIR-AIE 1.4.6.dev
BFP16MatMulOperands.h
Go to the documentation of this file.
1//===- BFP16MatMulOperands.h - Operands of bfp16 matmuls --------*- C++ -*-===//
2//
3// Copyright (C) 2026 Advanced Micro Devices, Inc.
4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5//
6//===----------------------------------------------------------------------===//
7
8#ifndef AIE_DIALECT_AIEVEC_TRANSFORMS_BFP16MATMULOPERANDS_H
9#define AIE_DIALECT_AIEVEC_TRANSFORMS_BFP16MATMULOPERANDS_H
10
11#include "mlir/IR/PatternMatch.h"
12
13namespace xilinx::aievec {
14
15// Converts the bf16 tiles of a buffer that a loop does not modify to bfp16
16// once, before the loop, and makes the loop load the converted blocks.
17void populateHoistBFP16ConversionPatterns(mlir::RewritePatternSet &patterns);
18
19// Makes matmuls load bfp16 blocks brought by DMA (aievec.load_bfp16) instead
20// of the bf16 tiles that a core decodes from them, and removes the decode.
21void populateReadDecodedBFP16Patterns(mlir::RewritePatternSet &patterns);
22
23// Turns loads of consecutive bfp16 blocks in a loop into one block-vector
24// load stream.
25void populateBFP16LoadStreamPatterns(mlir::RewritePatternSet &patterns);
26
27} // namespace xilinx::aievec
28
29#endif // AIE_DIALECT_AIEVEC_TRANSFORMS_BFP16MATMULOPERANDS_H
void populateHoistBFP16ConversionPatterns(mlir::RewritePatternSet &patterns)
void populateBFP16LoadStreamPatterns(mlir::RewritePatternSet &patterns)
void populateReadDecodedBFP16Patterns(mlir::RewritePatternSet &patterns)