MLIR 23.0.0git
XeGPUOps.cpp File Reference
#include "mlir/Dialect/Arith/Utils/Utils.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.

Namespaces

namespace  mlir
 Include the generated interface declarations.

Macros

#define DEBUG_TYPE   "xegpu"
#define GET_OP_CLASSES

Functions

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 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 LogicalResult verifyLayoutDistributable (Operation *op, std::optional< DistributeLayoutAttr > layout, ArrayRef< int64_t > shape, StringRef operandName)
static LogicalResult verifyDpasDimensions (Operation *op, ArrayRef< int64_t > aShape, ArrayRef< int64_t > bShape, ArrayRef< int64_t > resShape)
static LogicalResult verifyDpasAccumulator (Operation *op, Type accType, Type resultType)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "xegpu"

Definition at line 19 of file XeGPUOps.cpp.

◆ GET_OP_CLASSES

#define GET_OP_CLASSES

Definition at line 992 of file XeGPUOps.cpp.

Function Documentation

◆ getShapeOf()

SmallVector< int64_t > getShapeOf ( Type type)
static

Definition at line 39 of file XeGPUOps.cpp.

Referenced by isValidGatherScatterBufferParams().

◆ isReadHintOrNone()

bool isReadHintOrNone ( const CachePolicyAttr & attr)
static

Definition at line 48 of file XeGPUOps.cpp.

◆ isValidGatherScatterBufferParams()

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

Definition at line 65 of file XeGPUOps.cpp.

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

◆ IsValidMatrixOpParams()

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

Definition at line 117 of file XeGPUOps.cpp.

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

◆ isWriteHintOrNone()

bool isWriteHintOrNone ( const CachePolicyAttr & attr)
static

Definition at line 56 of file XeGPUOps.cpp.

◆ makeString()

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

Definition at line 25 of file XeGPUOps.cpp.

◆ verifyDpasAccumulator()

LogicalResult verifyDpasAccumulator ( Operation * op,
Type accType,
Type resultType )
static

Definition at line 763 of file XeGPUOps.cpp.

References mlir::Operation::emitOpError(), and success().

◆ verifyDpasDimensions()

LogicalResult verifyDpasDimensions ( Operation * op,
ArrayRef< int64_t > aShape,
ArrayRef< int64_t > bShape,
ArrayRef< int64_t > resShape )
static

Definition at line 722 of file XeGPUOps.cpp.

References mlir::Operation::emitOpError(), and success().

◆ verifyLayoutDistributable()

LogicalResult verifyLayoutDistributable ( Operation * op,
std::optional< DistributeLayoutAttr > layout,
ArrayRef< int64_t > shape,
StringRef operandName )
static

Definition at line 711 of file XeGPUOps.cpp.

References mlir::Operation::emitOpError(), and success().