MLIR
24.0.0git
lib
Conversion
TosaToLinalg
TosaToLinalgUtils.h
Go to the documentation of this file.
1
//===- TosaToLinalgUtils.h - Shared TOSA to Linalg lowering utilities
2
//-------===//
3
//
4
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5
// See https://llvm.org/LICENSE.txt for license information.
6
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7
//
8
//===----------------------------------------------------------------------===//
9
10
#ifndef MLIR_LIB_CONVERSION_TOSATOLINALG_TOSATOLINALGUTILS_H
11
#define MLIR_LIB_CONVERSION_TOSATOLINALG_TOSATOLINALGUTILS_H
12
13
#include "
mlir/IR/BuiltinTypes.h
"
14
#include "
mlir/IR/Value.h
"
15
16
namespace
mlir
{
17
class
PatternRewriter
;
18
19
namespace
tosa
{
20
struct
MatMulTOperands
{
21
Value
a
;
22
Value
b
;
23
Value
init
;
24
};
25
26
/// Broadcast the batch dimensions of the ranked operands and create a
27
/// zero-filled result tensor for either MATMUL_T lowering pattern.
28
MatMulTOperands
prepareMatMulOperands
(
PatternRewriter
&rewriter,
Location
loc,
29
Value
a,
Value
b
,
30
RankedTensorType outputType,
31
bool
transposeB);
32
}
// namespace tosa
33
}
// namespace mlir
34
35
#endif
// MLIR_LIB_CONVERSION_TOSATOLINALG_TOSATOLINALGUTILS_H
b
b
Return true if permutation is a valid permutation of the outer_dims_perm (case OuterOrInnerPerm::Oute...
Definition
LinalgTransformOps.cpp:2166
Value.h
mlir::Location
This class defines the main interface for locations in MLIR and acts as a non-nullable wrapper around...
Definition
Location.h:76
mlir::PatternRewriter
A special type of RewriterBase that coordinates the application of a rewrite pattern on the current I...
Definition
PatternMatch.h:807
mlir::Value
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
Definition
Value.h:96
BuiltinTypes.h
mlir::tosa
Definition
TosaToArith.h:23
mlir::tosa::prepareMatMulOperands
MatMulTOperands prepareMatMulOperands(PatternRewriter &rewriter, Location loc, Value a, Value b, RankedTensorType outputType, bool transposeB)
Broadcast the batch dimensions of the ranked operands and create a zero-filled result tensor for eith...
Definition
TosaToLinalg.cpp:1555
mlir
Include the generated interface declarations.
Definition
ABIRewriteContext.h:32
mlir::tosa::MatMulTOperands
Definition
TosaToLinalgUtils.h:20
mlir::tosa::MatMulTOperands::init
Value init
Definition
TosaToLinalgUtils.h:23
mlir::tosa::MatMulTOperands::a
Value a
Definition
TosaToLinalgUtils.h:21
mlir::tosa::MatMulTOperands::b
Value b
Definition
TosaToLinalgUtils.h:22
Generated on
for MLIR by
1.14.0