MLIR 22.0.0git
XeGPUOps.cpp File Reference
#include "mlir/Dialect/Arith/Utils/Utils.h"
#include "mlir/Dialect/GPU/IR/GPUDialect.h"
#include "mlir/Dialect/LLVMIR/XeVMDialect.h"
#include "mlir/Dialect/Utils/IndexingUtils.h"
#include "mlir/Dialect/Utils/StaticValueUtils.h"
#include "mlir/Dialect/XeGPU/IR/XeGPU.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Interfaces/ViewLikeInterface.h"
#include "llvm/Support/Debug.h"
#include <mlir/Dialect/XeGPU/IR/XeGPUAttrInterface.cpp.inc>
#include <mlir/Dialect/XeGPU/IR/XeGPUEnums.cpp.inc>
#include <mlir/Dialect/XeGPU/IR/XeGPU.cpp.inc>

Go to the source code of this file.

Classes

struct  FoldConvertLayoutOp

Namespaces

namespace  mlir
 Include the generated interface declarations.

Macros

#define DEBUG_TYPE   "xegpu"
#define GET_OP_CLASSES

Functions

static bool isSharedMemory (const MemRefType &memrefTy)
template<typename T>
static std::string makeString (T array, bool breakline=false)
static SmallVector< int64_tgetShapeOf (Type type)
static bool isReadHintOrNone (const CachePolicyAttr &attr)
static bool isWriteHintOrNone (const CachePolicyAttr &attr)
static LogicalResult isValidGatherScatterParams (Type maskTy, VectorType valueTy, TensorDescType tdescTy, function_ref< InFlightDiagnostic()> emitError)
static LogicalResult isValidGatherScatterBufferParams (Type offsetsTy, Type maskTy, VectorType valueTy, int64_t chunkSize, function_ref< InFlightDiagnostic()> emitError)
LogicalResult IsValidMatrixOpParams (VectorType dataTy, MemDescType mdescTy, UnitAttr subgroup_block_io, DistributeLayoutAttr layout, function_ref< InFlightDiagnostic()> emitError)
static ParseResult parseOptionalDynamicIndexList (OpAsmParser &parser, SmallVectorImpl< OpAsmParser::UnresolvedOperand > &values, DenseI64ArrayAttr &integers, SmallVectorImpl< Type > *valueTypes=nullptr, AsmParser::Delimiter delimiter=AsmParser::Delimiter::Square)
static void printOptionalDynamicIndexList (OpAsmPrinter &printer, Operation *op, OperandRange values, DenseI64ArrayAttr integers)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "xegpu"

Definition at line 21 of file XeGPUOps.cpp.

◆ GET_OP_CLASSES

#define GET_OP_CLASSES

Definition at line 1189 of file XeGPUOps.cpp.

Function Documentation

◆ getShapeOf()

SmallVector< int64_t > getShapeOf ( Type type)
static

Definition at line 52 of file XeGPUOps.cpp.

Referenced by isValidGatherScatterBufferParams(), and isValidGatherScatterParams().

◆ isReadHintOrNone()

bool isReadHintOrNone ( const CachePolicyAttr & attr)
static

Definition at line 61 of file XeGPUOps.cpp.

◆ isSharedMemory()

bool isSharedMemory ( const MemRefType & memrefTy)
static

Definition at line 26 of file XeGPUOps.cpp.

◆ isValidGatherScatterBufferParams()

LogicalResult isValidGatherScatterBufferParams ( Type offsetsTy,
Type maskTy,
VectorType valueTy,
int64_t chunkSize,
function_ref< InFlightDiagnostic()> emitError )
static

Definition at line 125 of file XeGPUOps.cpp.

References mlir::emitError(), getShapeOf(), and success().

◆ isValidGatherScatterParams()

LogicalResult isValidGatherScatterParams ( Type maskTy,
VectorType valueTy,
TensorDescType tdescTy,
function_ref< InFlightDiagnostic()> emitError )
static

Definition at line 78 of file XeGPUOps.cpp.

References mlir::emitError(), getShapeOf(), makeString(), and success().

◆ IsValidMatrixOpParams()

LogicalResult IsValidMatrixOpParams ( VectorType dataTy,
MemDescType mdescTy,
UnitAttr subgroup_block_io,
DistributeLayoutAttr layout,
function_ref< InFlightDiagnostic()> emitError )

Definition at line 177 of file XeGPUOps.cpp.

References ArrayAttr(), mlir::emitError(), and success().

◆ isWriteHintOrNone()

bool isWriteHintOrNone ( const CachePolicyAttr & attr)
static

Definition at line 69 of file XeGPUOps.cpp.

◆ makeString()

template<typename T>
std::string makeString ( T array,
bool breakline = false )
static

Definition at line 38 of file XeGPUOps.cpp.

Referenced by isValidGatherScatterParams().

◆ parseOptionalDynamicIndexList()

◆ printOptionalDynamicIndexList()

void printOptionalDynamicIndexList ( OpAsmPrinter & printer,
Operation * op,
OperandRange values,
DenseI64ArrayAttr integers )
static

Definition at line 450 of file XeGPUOps.cpp.

References mlir::printDynamicIndexList(), and mlir::AsmParser::Square.