MLIR
18.0.0git
|
Namespaces | |
detail | |
gpu | |
Classes | |
class | StructuredOpPredicateOpTrait |
struct | TileSizesSpec |
struct | NumThreadsSpec |
class | AtMostOneOpMatcherOpTrait |
class | SingleOpMatcherOpTrait |
class | SingleValueMatcherOpTrait |
class | TransformDialectData |
Base class for additional data owned by the Transform dialect. More... | |
class | TransformDialectExtension |
Base class for extensions of the Transform dialect that supports injecting operations into the Transform dialect at load time. More... | |
class | BuildOnly |
A wrapper for transform dialect extensions that forces them to be constructed in the build-only mode. More... | |
class | TransformOptions |
Options controlling the application of transform operations by the TransformState. More... | |
class | TransformState |
The state maintained across applications of various ops implementing the TransformOpInterface. More... | |
class | TransformResults |
Local mapping between values defined by a specific op implementing the TransformOpInterface and the payload IR ops they correspond to. More... | |
class | TrackingListener |
A listener that updates a TransformState based on IR modifications. More... | |
class | ErrorCheckingTrackingListener |
A specialized listener that keeps track of cases in which no replacement payload could be found. More... | |
class | TransformRewriter |
This is a special rewriter to be used in transform op implementations, providing additional helper functions to update the transform state, etc. More... | |
class | PossibleTopLevelTransformOpTrait |
This trait is supposed to be attached to Transform dialect operations that can be standalone top-level transforms. More... | |
class | TransformEachOpTrait |
Trait implementing the TransformOpInterface for operations applying a transformation to a single operation handle and producing an arbitrary number of handles and parameter values. More... | |
struct | TransformMappingResource |
Side effect resource corresponding to the mapping between Transform IR values and Payload IR operations. More... | |
struct | PayloadIRResource |
Side effect resource corresponding to the Payload IR itself. More... | |
class | FunctionalStyleTransformOpTrait |
Trait implementing the MemoryEffectOpInterface for operations that "consume" their operands and produce new results. More... | |
class | NavigationTransformOpTrait |
Trait implementing the MemoryEffectOpInterface for single-operand single-result operations that use their operand without consuming and without modifying the Payload IR to produce a new handle. More... | |
class | ParamProducerTransformOpTrait |
Trait implementing the MemoryEffectsOpInterface for operations that produce transform dialect parameters. More... | |
class | ReportTrackingListenerFailuresOpTrait |
TrackingListener failures are reported only for ops that have this trait. More... | |
class | ApplyToEachResultList |
A list of results of applying a transform op with ApplyEachOpTrait to a single payload operation, co-indexed with the results of the transform op. More... | |
class | PDLMatchHooks |
PDL constraint callbacks that can be used by the PDL extension of the Transform dialect. More... | |
class | TransformInterpreterPassBase |
Base class for transform dialect interpreter passes that can consume and dump transform dialect scripts in separate files. More... | |
Typedefs | |
using | Param = Attribute |
using | MappedValue = llvm::PointerUnion< Operation *, Param, Value > |
using | ApplyToEachResult = MappedValue |
A single result of applying a transform op with ApplyEachOpTrait to a single payload operation. More... | |
using | SequenceBodyBuilderFn = ::llvm::function_ref< void(::mlir::OpBuilder &, ::mlir::Location, ::mlir::BlockArgument)> |
A builder function that populates the body of a SequenceOp. More... | |
using | SequenceBodyBuilderArgsFn = ::llvm::function_ref< void(::mlir::OpBuilder &, ::mlir::Location, ::mlir::BlockArgument, ::mlir::ValueRange)> |
Functions | |
DiagnosedSilenceableFailure | tileToForallOpImpl (RewriterBase &rewriter, transform::TransformState &state, TransformOpInterface transformOp, Operation *target, ArrayRef< OpFoldResult > mixedNumThreads, ArrayRef< OpFoldResult > mixedTileSizes, std::optional< ArrayAttr > mapping, linalg::ForallTilingResult &tilingResult) |
Implementation of tiling operations using scf.forall . More... | |
LogicalResult | applyTransforms (Operation *payloadRoot, TransformOpInterface transform, const RaggedArray< MappedValue > &extraMapping={}, const TransformOptions &options=TransformOptions(), bool enforceToplevelTransformOp=true) |
Entry point to the Transform dialect infrastructure. More... | |
void | consumesHandle (ValueRange handles, SmallVectorImpl< MemoryEffects::EffectInstance > &effects) |
Populates effects with the memory effects indicating the operation on the given handle value: More... | |
void | producesHandle (ValueRange handles, SmallVectorImpl< MemoryEffects::EffectInstance > &effects) |
void | onlyReadsHandle (ValueRange handles, SmallVectorImpl< MemoryEffects::EffectInstance > &effects) |
bool | isHandleConsumed (Value handle, transform::TransformOpInterface transform) |
Checks whether the transform op consumes the given handle. More... | |
void | modifiesPayload (SmallVectorImpl< MemoryEffects::EffectInstance > &effects) |
Populates effects with the memory effects indicating the access to payload IR resource. More... | |
void | onlyReadsPayload (SmallVectorImpl< MemoryEffects::EffectInstance > &effects) |
bool | doesModifyPayload (transform::TransformOpInterface transform) |
Checks whether the transform op modifies the payload. More... | |
bool | doesReadPayload (transform::TransformOpInterface transform) |
Checks whether the transform op reads the payload. More... | |
void | getConsumedBlockArguments (Block &block, llvm::SmallDenseSet< unsigned > &consumedArguments) |
Populates consumedArguments with positions of block arguments that are consumed by the operations in the block . More... | |
void | registerLoopExtension (DialectRegistry &dialectRegistry) |
Registers the loop extension of the Transform dialect in the given registry. More... | |
void | registerPDLExtension (DialectRegistry &dialectRegistry) |
Registers the PDL extension of the Transform dialect in the given registry. More... | |
LogicalResult | applyTransformNamedSequence (Operation *payload, Operation *transformRoot, ModuleOp transformModule, const TransformOptions &options) |
Standalone util to apply the named sequence transformRoot to payload IR. More... | |
void | printPackedOrDynamicIndexList (OpAsmPrinter &printer, Operation *op, Value packed, Type packedType, OperandRange values, TypeRange valueTypes, DenseI64ArrayAttr integers) |
Printer hook for custom directive in assemblyFormat. More... | |
ParseResult | parsePackedOrDynamicIndexList (OpAsmParser &parser, std::optional< OpAsmParser::UnresolvedOperand > &packed, Type &packedType, SmallVectorImpl< OpAsmParser::UnresolvedOperand > &values, SmallVectorImpl< Type > &valueTypes, DenseI64ArrayAttr &integers) |
Parser hook for custom directive in assemblyFormat. More... | |
using mlir::transform::ApplyToEachResult = typedef MappedValue |
A single result of applying a transform op with ApplyEachOpTrait
to a single payload operation.
Definition at line 1347 of file TransformInterfaces.h.
using mlir::transform::MappedValue = typedef llvm::PointerUnion<Operation *, Param, Value> |
Definition at line 30 of file TransformInterfaces.h.
using mlir::transform::Param = typedef Attribute |
Definition at line 29 of file TransformInterfaces.h.
using mlir::transform::SequenceBodyBuilderArgsFn = typedef ::llvm::function_ref<void(::mlir::OpBuilder &, ::mlir::Location, ::mlir::BlockArgument, ::mlir::ValueRange)> |
Definition at line 37 of file TransformOps.h.
using mlir::transform::SequenceBodyBuilderFn = typedef ::llvm::function_ref<void( ::mlir::OpBuilder &, ::mlir::Location, ::mlir::BlockArgument)> |
A builder function that populates the body of a SequenceOp.
Definition at line 35 of file TransformOps.h.
LogicalResult mlir::transform::applyTransformNamedSequence | ( | Operation * | payload, |
Operation * | transformRoot, | ||
ModuleOp | transformModule, | ||
const TransformOptions & | options | ||
) |
Standalone util to apply the named sequence transformRoot
to payload
IR.
This is done in 2 steps:
transformModule
is provided and is not nested under transformRoot
, it will be "linked into" the IR containing transformRoot
to resolve undefined named sequences.transformRoot
are applied to payload
, assuming the named sequence has a single argument handle that will be associated with payload
on run. Definition at line 185 of file TransformInterpreterUtils.cpp.
References applyTransforms(), DBGS, mlir::Operation::emitError(), mlir::failed(), mlir::SymbolTable::getNearestSymbolTable(), mlir::transform::detail::mergeSymbolsInto(), and options.
LogicalResult mlir::transform::applyTransforms | ( | Operation * | payloadRoot, |
TransformOpInterface | transform, | ||
const RaggedArray< MappedValue > & | extraMapping = {} , |
||
const TransformOptions & | options = TransformOptions() , |
||
bool | enforceToplevelTransformOp = true |
||
) |
Entry point to the Transform dialect infrastructure.
Applies the transformation specified by transform
to payload IR contained in payloadRoot
. The transform
operation may contain other operations that will be executed following the internal logic of the operation. It must have the PossibleTopLevelTransformOp
trait and not have any operands. This function internally keeps track of the transformation state.
Definition at line 1964 of file TransformInterfaces.cpp.
References mlir::failed(), mlir::failure(), and mlir::transform::detail::verifyPossibleTopLevelTransformOpTrait().
Referenced by applyTransformNamedSequence(), and mlir::transform::detail::interpreterBaseRunOnOperationImpl().
void mlir::transform::consumesHandle | ( | ValueRange | handles, |
SmallVectorImpl< MemoryEffects::EffectInstance > & | effects | ||
) |
Populates effects
with the memory effects indicating the operation on the given handle value:
Definition at line 1774 of file TransformInterfaces.cpp.
References mlir::SideEffects::Effect::Base< DerivedEffect, BaseEffect >::get(), and mlir::SideEffects::Resource::Base< TransformMappingResource >::get().
Referenced by mlir::transform::FunctionalStyleTransformOpTrait< OpTy >::getEffects().
bool mlir::transform::doesModifyPayload | ( | transform::TransformOpInterface | transform | ) |
Checks whether the transform op modifies the payload.
Definition at line 1835 of file TransformInterfaces.cpp.
bool mlir::transform::doesReadPayload | ( | transform::TransformOpInterface | transform | ) |
Checks whether the transform op reads the payload.
Definition at line 1842 of file TransformInterfaces.cpp.
void mlir::transform::getConsumedBlockArguments | ( | Block & | block, |
llvm::SmallDenseSet< unsigned > & | consumedArguments | ||
) |
Populates consumedArguments
with positions of block
arguments that are consumed by the operations in the block
.
bool mlir::transform::isHandleConsumed | ( | Value | handle, |
transform::TransformOpInterface | transform | ||
) |
Checks whether the transform op consumes the given handle.
Definition at line 1795 of file TransformInterfaces.cpp.
Referenced by mlir::transform::TransformState::applyTransform(), and isValueUsePotentialConsumer().
void mlir::transform::modifiesPayload | ( | SmallVectorImpl< MemoryEffects::EffectInstance > & | effects | ) |
Populates effects
with the memory effects indicating the access to payload IR resource.
Definition at line 1824 of file TransformInterfaces.cpp.
References mlir::SideEffects::Effect::Base< DerivedEffect, BaseEffect >::get(), and mlir::SideEffects::Resource::Base< PayloadIRResource >::get().
Referenced by mlir::transform::FunctionalStyleTransformOpTrait< OpTy >::getEffects().
void mlir::transform::onlyReadsHandle | ( | ValueRange | handles, |
SmallVectorImpl< MemoryEffects::EffectInstance > & | effects | ||
) |
Definition at line 1815 of file TransformInterfaces.cpp.
References mlir::SideEffects::Effect::Base< DerivedEffect, BaseEffect >::get(), and mlir::SideEffects::Resource::Base< TransformMappingResource >::get().
Referenced by mlir::transform::AtMostOneOpMatcherOpTrait< OpTy >::getEffects(), mlir::transform::SingleValueMatcherOpTrait< OpTy >::getEffects(), mlir::transform::NavigationTransformOpTrait< OpTy >::getEffects(), and mlir::transform::detail::getPotentialTopLevelEffects().
void mlir::transform::onlyReadsPayload | ( | SmallVectorImpl< MemoryEffects::EffectInstance > & | effects | ) |
Definition at line 1830 of file TransformInterfaces.cpp.
References mlir::SideEffects::Effect::Base< DerivedEffect, BaseEffect >::get(), and mlir::SideEffects::Resource::Base< PayloadIRResource >::get().
Referenced by mlir::transform::AtMostOneOpMatcherOpTrait< OpTy >::getEffects(), mlir::transform::SingleValueMatcherOpTrait< OpTy >::getEffects(), and mlir::transform::NavigationTransformOpTrait< OpTy >::getEffects().
ParseResult mlir::transform::parsePackedOrDynamicIndexList | ( | OpAsmParser & | parser, |
std::optional< OpAsmParser::UnresolvedOperand > & | packed, | ||
Type & | packedType, | ||
SmallVectorImpl< OpAsmParser::UnresolvedOperand > & | values, | ||
SmallVectorImpl< Type > & | valueTypes, | ||
DenseI64ArrayAttr & | integers | ||
) |
Parser hook for custom directive in assemblyFormat.
custom<PackedOrDynamicIndexList>($packed, type($packed), $values, type($values), $integers)
See printPackedOrDynamicIndexList
for details.
Definition at line 29 of file Utils.cpp.
References mlir::LogicalResult::failed(), mlir::failure(), mlir::AsmParser::getBuilder(), mlir::Builder::getDenseI64ArrayAttr(), mlir::AsmParser::parseColonType(), mlir::parseDynamicIndexList(), mlir::AsmParser::parseLParen(), mlir::OpAsmParser::parseOperand(), mlir::AsmParser::parseOptionalStar(), mlir::AsmParser::parseRParen(), mlir::LogicalResult::succeeded(), and mlir::success().
void mlir::transform::printPackedOrDynamicIndexList | ( | OpAsmPrinter & | printer, |
Operation * | op, | ||
Value | packed, | ||
Type | packedType, | ||
OperandRange | values, | ||
TypeRange | valueTypes, | ||
DenseI64ArrayAttr | integers | ||
) |
Printer hook for custom directive in assemblyFormat.
custom<PackedOrDynamicIndexList>($packed, type($packed), $values, type($values), $integers)
where values
are variadic Index values, integers
is an I64ArrayAttr
and packed
is a single transform dialect handle who's mapped payload ops have a single Index result and represent the index list. Either packed
or the other two parameters may be specified.
This allows idiomatic printing of mixed value and integer attributes in a list or with a single handle. E.g., [arg0 : !transform.any_op, 7, 42, arg42 : !transform.param<i64>]
or just h : !transform.any_op
.
void mlir::transform::producesHandle | ( | ValueRange | handles, |
SmallVectorImpl< MemoryEffects::EffectInstance > & | effects | ||
) |
Definition at line 1804 of file TransformInterfaces.cpp.
References mlir::SideEffects::Effect::Base< DerivedEffect, BaseEffect >::get(), and mlir::SideEffects::Resource::Base< TransformMappingResource >::get().
Referenced by mlir::transform::AtMostOneOpMatcherOpTrait< OpTy >::getEffects(), mlir::transform::SingleValueMatcherOpTrait< OpTy >::getEffects(), mlir::transform::FunctionalStyleTransformOpTrait< OpTy >::getEffects(), mlir::transform::NavigationTransformOpTrait< OpTy >::getEffects(), and mlir::transform::detail::getPotentialTopLevelEffects().
void mlir::transform::registerLoopExtension | ( | DialectRegistry & | dialectRegistry | ) |
Registers the loop extension of the Transform dialect in the given registry.
Definition at line 32 of file LoopExtension.cpp.
References mlir::DialectRegistry::addExtensions().
Referenced by mlir::registerAllExtensions().
void mlir::transform::registerPDLExtension | ( | DialectRegistry & | dialectRegistry | ) |
Registers the PDL extension of the Transform dialect in the given registry.
Definition at line 67 of file PDLExtension.cpp.
References mlir::DialectRegistry::addExtensions().
Referenced by mlir::registerAllExtensions().
DiagnosedSilenceableFailure mlir::transform::tileToForallOpImpl | ( | RewriterBase & | rewriter, |
transform::TransformState & | state, | ||
TransformOpInterface | transformOp, | ||
Operation * | target, | ||
ArrayRef< OpFoldResult > | mixedNumThreads, | ||
ArrayRef< OpFoldResult > | mixedTileSizes, | ||
std::optional< ArrayAttr > | mapping, | ||
linalg::ForallTilingResult & | tilingResult | ||
) |
Implementation of tiling operations using scf.forall
.
Definition at line 2823 of file LinalgTransformOps.cpp.