MLIR  22.0.0git
Classes | Namespaces | Macros | Functions
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

 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_t > getShapeOf (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, 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 1139 of file XeGPUOps.cpp.

Function Documentation

◆ getShapeOf()

static SmallVector<int64_t> getShapeOf ( Type  type)
static

Definition at line 52 of file XeGPUOps.cpp.

Referenced by isValidGatherScatterBufferParams(), and isValidGatherScatterParams().

◆ isReadHintOrNone()

static bool isReadHintOrNone ( const CachePolicyAttr &  attr)
static

Definition at line 61 of file XeGPUOps.cpp.

References kind.

◆ isSharedMemory()

static bool isSharedMemory ( const MemRefType &  memrefTy)
static

Definition at line 26 of file XeGPUOps.cpp.

◆ isValidGatherScatterBufferParams()

static 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(), and getShapeOf().

◆ isValidGatherScatterParams()

static 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(), and makeString().

◆ IsValidMatrixOpParams()

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

Definition at line 177 of file XeGPUOps.cpp.

References mlir::emitError().

◆ isWriteHintOrNone()

static bool isWriteHintOrNone ( const CachePolicyAttr &  attr)
static

Definition at line 69 of file XeGPUOps.cpp.

References kind.

◆ makeString()

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

Definition at line 38 of file XeGPUOps.cpp.

Referenced by isValidGatherScatterParams().

◆ parseOptionalDynamicIndexList()

static ParseResult parseOptionalDynamicIndexList ( OpAsmParser parser,
SmallVectorImpl< OpAsmParser::UnresolvedOperand > &  values,
DenseI64ArrayAttr integers,
SmallVectorImpl< Type > *  valueTypes = nullptr,
AsmParser::Delimiter  delimiter = AsmParser::Delimiter::Square 
)
static

◆ printOptionalDynamicIndexList()

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

Definition at line 424 of file XeGPUOps.cpp.

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