|
MLIR 24.0.0git
|
#include "mlir/Dialect/XeGPU/TransformOps/XeGPUTransformOps.h"#include "mlir/Analysis/SliceAnalysis.h"#include "mlir/Dialect/GPU/IR/GPUDialect.h"#include "mlir/Dialect/SCF/IR/SCF.h"#include "mlir/Dialect/SCF/Utils/Utils.h"#include "mlir/Dialect/Transform/Utils/Utils.h"#include "mlir/Dialect/XeGPU/IR/XeGPU.h"#include "mlir/Dialect/XeGPU/Utils/XeGPUUtils.h"#include "mlir/IR/Dominance.h"#include "mlir/Interfaces/SideEffectInterfaces.h"#include "llvm/ADT/SmallVectorExtras.h"#include <optional>#include "llvm/Support/DebugLog.h"#include "mlir/Dialect/XeGPU/TransformOps/XeGPUTransformOps.cpp.inc"Go to the source code of this file.
Functions | |
| static DiagnosedSilenceableFailure | convertMixedValuesToInt (transform::TransformState &state, TransformOpInterface transformOp, SmallVectorImpl< int32_t > &result, ArrayRef< OpFoldResult > ofrs) |
| Assuming that ofr is an index attr or a param of index type or a transform dialect handle mapped to exactly one op with one index result, get that value and cast it to int type. | |
| static DiagnosedSilenceableFailure | convertPackedValueToInt (transform::TransformState &state, TransformOpInterface transformOp, SmallVectorImpl< int32_t > &result, Value packedHandle) |
| Convert a single packed handle, that is either a transform param associated with a variadic number of integer attributes or mapped to a variadic number of payload ops each defining a single constant index result, to a list of int values. | |
| template<typename T> | |
| static std::optional< T > | findProducerOfType (Value val) |
| It's assumed that producer ops are chained through their first operand. | |
| static xegpu::LayoutAttr | createLayoutAttr (MLIRContext *ctx, ArrayRef< int32_t > sgLayout, ArrayRef< int32_t > sgData, std::optional< ArrayRef< int32_t > > instData, ArrayRef< int32_t > order) |
| Create a layout attribute from the given parameters. | |
| DiagnosedSilenceableFailure | getLayoutAttrFromOperands (MLIRContext *ctx, transform::TransformState &state, TransformOpInterface transformOp, ArrayRef<::mlir::OpFoldResult > mixedSgLayout, ArrayRef<::mlir::OpFoldResult > mixedSgData, ArrayRef<::mlir::OpFoldResult > mixedInstData, Value packedSgLayout, Value packedSgData, Value packedInstData, ArrayRef< int32_t > order, xegpu::LayoutAttr &layoutAttr) |
| Generate xegpu::LayoutAttr from op mixed layout values. | |
| #define DEBUG_TYPE "xegpu-transforms" |
Definition at line 24 of file XeGPUTransformOps.cpp.
| #define GET_ATTRDEF_CLASSES |
| #define GET_ATTRDEF_CLASSES |
| #define GET_OP_CLASSES |
Definition at line 727 of file XeGPUTransformOps.cpp.
| #define GET_OP_LIST |
| #define GET_TYPEDEF_CLASSES |
| #define MLIR_DECLARE_EXPLICIT_FALLBACK_TYPE_ID | ( | CLASS_NAME | ) |
| #define MLIR_DECLARE_EXPLICIT_SELF_OWNING_TYPE_ID | ( | CLASS_NAME | ) |
| #define MLIR_DECLARE_EXPLICIT_TYPE_ID | ( | CLASS_NAME | ) |
| #define MLIR_DEFINE_EXPLICIT_FALLBACK_TYPE_ID | ( | CLASS_NAME | ) |
| #define MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID | ( | CLASS_NAME | ) |
| #define MLIR_DEFINE_EXPLICIT_SELF_OWNING_TYPE_ID | ( | CLASS_NAME | ) |
| #define MLIR_DEFINE_EXPLICIT_TYPE_ID | ( | CLASS_NAME | ) |
| #define MLIR_IR_AFFINEEXPR_H |
| #define MLIR_IR_AFFINEMAP_H |
| #define MLIR_IR_ATTRIBUTES_H |
| #define MLIR_IR_ATTRIBUTESUPPORT_H |
| #define MLIR_IR_ATTRTYPESUBELEMENTS_H |
| #define MLIR_IR_BLOCK_H |
| #define MLIR_IR_BLOCKSUPPORT_H |
| #define MLIR_IR_BUILDERS_H |
| #define MLIR_IR_BUILTINATTRIBUTEINTERFACES_H |
| #define MLIR_IR_BUILTINATTRIBUTES_H |
| #define MLIR_IR_BUILTINTYPEINTERFACES_H |
| #define MLIR_IR_BUILTINTYPES_H |
| #define MLIR_IR_DIAGNOSTICS_H |
| #define MLIR_IR_DIALECT_H |
| #define MLIR_IR_DIALECTINTERFACE_H |
| #define MLIR_IR_DIALECTREGISTRY_H |
| #define MLIR_IR_LOCATION_H |
| #define MLIR_IR_MLIRCONTEXT_H |
| #define MLIR_IR_ODSSUPPORT_H |
| #define MLIR_IR_OPASMSUPPORT_H_ |
| #define MLIR_IR_OPDEFINITION_H |
| #define MLIR_IR_OPERATION_H |
| #define MLIR_IR_OPERATIONSUPPORT_H |
| #define MLIR_IR_OPIMPLEMENTATION_H |
| #define MLIR_IR_QuantStorageTypeInterface_H |
| #define MLIR_IR_REGION_H |
| #define MLIR_IR_STORAGEUNIQUERSUPPORT_H |
| #define MLIR_IR_TYPERANGE_H |
| #define MLIR_IR_TYPES_H |
| #define MLIR_IR_TYPESUPPORT_H |
| #define MLIR_IR_USEDEFLISTS_H |
| #define MLIR_IR_VALUE_H |
| #define MLIR_IR_VALUERANGE_H |
| #define MLIR_IR_VISITORS_H |
| #define MLIR_SUPPORT_ADTEXTRAS_H |
| #define MLIR_SUPPORT_COMPLEX_H |
| #define MLIR_SUPPORT_CYCLICREPLACERCACHE_H |
| #define MLIR_SUPPORT_INTERFACESUPPORT_H |
| #define MLIR_SUPPORT_LLVM_H |
| #define MLIR_SUPPORT_STORAGEUNIQUER_H |
| #define MLIR_SUPPORT_TYPEID_H |
| #define MLIR_SUPPORT_WALKRESULT_H |
| #define MLIR_USE_FALLBACK_TYPE_IDS false |
|
static |
Assuming that ofr is an index attr or a param of index type or a transform dialect handle mapped to exactly one op with one index result, get that value and cast it to int type.
Definition at line 32 of file XeGPUTransformOps.cpp.
References mlir::Operation::getLoc(), mlir::Value::getLoc(), mlir::Operation::getNumResults(), mlir::transform::TransformState::getParams(), mlir::transform::TransformState::getPayloadOps(), mlir::Operation::getResult(), mlir::Value::getType(), mlir::Type::isIndex(), mlir::m_Constant(), mlir::matchPattern(), result, and mlir::DiagnosedSilenceableFailure::success().
Referenced by getLayoutAttrFromOperands().
|
static |
Convert a single packed handle, that is either a transform param associated with a variadic number of integer attributes or mapped to a variadic number of payload ops each defining a single constant index result, to a list of int values.
Definition at line 94 of file XeGPUTransformOps.cpp.
References mlir::transform::TransformState::getParams(), mlir::transform::TransformState::getPayloadOps(), mlir::Value::getType(), mlir::m_Constant(), mlir::matchPattern(), result, and mlir::DiagnosedSilenceableFailure::success().
Referenced by getLayoutAttrFromOperands().
|
static |
Create a layout attribute from the given parameters.
Definition at line 171 of file XeGPUTransformOps.cpp.
References mlir::detail::DenseArrayAttrImpl< int32_t >::get().
Referenced by getLayoutAttrFromOperands().
|
static |
It's assumed that producer ops are chained through their first operand.
Producer chain is traced trough loop block arguments (init values).
Definition at line 135 of file XeGPUTransformOps.cpp.
References findProducerOfType(), mlir::Value::getDefiningOp(), mlir::Operation::getNumOperands(), mlir::Value::getNumUses(), mlir::Operation::getOperand(), and mlir::Value::getUsers().
Referenced by findProducerOfType().
| DiagnosedSilenceableFailure getLayoutAttrFromOperands | ( | MLIRContext * | ctx, |
| transform::TransformState & | state, | ||
| TransformOpInterface | transformOp, | ||
| ArrayRef<::mlir::OpFoldResult > | mixedSgLayout, | ||
| ArrayRef<::mlir::OpFoldResult > | mixedSgData, | ||
| ArrayRef<::mlir::OpFoldResult > | mixedInstData, | ||
| Value | packedSgLayout, | ||
| Value | packedSgData, | ||
| Value | packedInstData, | ||
| ArrayRef< int32_t > | order, | ||
| xegpu::LayoutAttr & | layoutAttr ) |
Generate xegpu::LayoutAttr from op mixed layout values.
Definition at line 185 of file XeGPUTransformOps.cpp.
References convertMixedValuesToInt(), convertPackedValueToInt(), createLayoutAttr(), and mlir::DiagnosedSilenceableFailure::success().