MLIR 24.0.0git
VectorToGPU.h
Go to the documentation of this file.
1//===- VectorToGPU.h - Convert vector to GPU dialect ------------*- C++ -*-===//
2//
3// Part of the LLVM Project, 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//===----------------------------------------------------------------------===//
8
9#ifndef MLIR_CONVERSION_VECTORTOGPU_VECTORTOGPU_H
10#define MLIR_CONVERSION_VECTORTOGPU_VECTORTOGPU_H
11
13
14namespace mlir {
15class MLIRContext;
16class Pass;
18
19#define GEN_PASS_DECL_CONVERTVECTORTOGPUPASS
20#include "mlir/Conversion/Passes.h.inc"
21
22/// Populate patterns that prepare vector operations for lowering to
23/// GPU dialect MMA matrix operations.
24void populatePrepareVectorToMMAPatterns(RewritePatternSet &patterns);
25
26/// Convert vector ops to MMA matrix operations nested under `rootOp`. This will
27/// convert slice of operations that can be legally converted to MMA operations.
28/// The rest of the vector operations are left untouched.
29LogicalResult convertVectorToMMAOps(RewriterBase &rewriter, Operation *rootOp);
30} // namespace mlir
31
32#endif // MLIR_CONVERSION_VECTORTOGPU_VECTORTOGPU_H
MLIRContext is the top-level object for a collection of MLIR operations.
Definition MLIRContext.h:71
The abstract base pass class.
Definition Pass.h:52
Include the generated interface declarations.
void populatePrepareVectorToMMAPatterns(RewritePatternSet &patterns)
Populate patterns that prepare vector operations for lowering to GPU dialect MMA matrix operations.
LogicalResult convertVectorToMMAOps(RewriterBase &rewriter, Operation *rootOp)
Convert vector ops to MMA matrix operations nested under rootOp.