MLIR 22.0.0git
mlir::linalg::RegionMatcher Struct Reference

A struct containing common matchers over linalg op's region. More...

#include "mlir/Dialect/Linalg/Utils/Utils.h"

Public Types

enum class  BinaryOpKind { IAdd }

Static Public Member Functions

static std::optional< BinaryOpKindmatchAsScalarBinaryOp (GenericOp op)
 Matches the given linalg op if its body is performing binary operation on int or float scalar values and returns the binary op kind.

Detailed Description

A struct containing common matchers over linalg op's region.

Definition at line 336 of file Utils.h.

Member Enumeration Documentation

◆ BinaryOpKind

Enumerator
IAdd 

Definition at line 337 of file Utils.h.

Member Function Documentation

◆ matchAsScalarBinaryOp()

std::optional< RegionMatcher::BinaryOpKind > RegionMatcher::matchAsScalarBinaryOp ( GenericOp op)
static

Matches the given linalg op if its body is performing binary operation on int or float scalar values and returns the binary op kind.

The linalg op's region is expected to be

{
^bb(%a: <scalar-type>, %b: <scalar-type>):
%0 = <binary-op> %a, %b: <scalar-type>
linalg.yield %0: <scalar-type>
}
b
Return true if permutation is a valid permutation of the outer_dims_perm (case OuterOrInnerPerm::Oute...

Definition at line 93 of file Utils.cpp.

References b, mlir::Block::front(), mlir::Block::getArgument(), mlir::Block::getNumArguments(), mlir::Block::getOperations(), mlir::Value::getType(), IAdd, mlir::Type::isSignlessIntOrFloat(), mlir::m_Op(), mlir::m_Op(), mlir::matchers::m_Val(), and mlir::Block::without_terminator().


The documentation for this struct was generated from the following files: