[mlir][NFC] Update remaining textual references of un-namespaced `func` operationsThe special case parsing of operations in the `func` dialect is being removed, andoperations will require the dial
[mlir][NFC] Update remaining textual references of un-namespaced `func` operationsThe special case parsing of operations in the `func` dialect is being removed, andoperations will require the dialect namespace prefix.
show more ...
[mlir][NFC] Update textual references of `func` to `func.func` in Conversion/ testsThe special case parsing of `func` operations is being removed.
[mlir] Move SelectOp from Standard to ArithmeticThis is part of splitting up the standard dialect. See https://llvm.discourse.group/t/standard-dialect-the-final-chapter/ for discussion.Differenti
[mlir] Move SelectOp from Standard to ArithmeticThis is part of splitting up the standard dialect. See https://llvm.discourse.group/t/standard-dialect-the-final-chapter/ for discussion.Differential Revision: https://reviews.llvm.org/D118648
[MLIR] Replace std ops with arith dialect opsPrecursor: https://reviews.llvm.org/D110200Removed redundant ops from the standard dialect that were moved to the`arith` or `math` dialects.Renamed
[MLIR] Replace std ops with arith dialect opsPrecursor: https://reviews.llvm.org/D110200Removed redundant ops from the standard dialect that were moved to the`arith` or `math` dialects.Renamed all instances of operations in the codebase and in tests.Reviewed By: rriddle, jpienaarDifferential Revision: https://reviews.llvm.org/D110797
[mlir] support max/min lower/upper bounds in affine.parallelThis enables to express more complex parallel loops in the affine framework,for example, in cases of tiling by sizes not dividing loop t
[mlir] support max/min lower/upper bounds in affine.parallelThis enables to express more complex parallel loops in the affine framework,for example, in cases of tiling by sizes not dividing loop trip counts perfectlyor inner wavefront parallelism, among others. One can't use affine.max/minand supply values to the nested loop bounds since the results of suchaffine.max/min operations aren't valid symbols. Making them valid symbolsisn't an option since they would introduce selection trees into memrefsubscript arithmetic as an unintended and undesired consequence. Alsoadd support for converting such loops to SCF. Drop some API that isn't used inthe core repo from AffineParallelOp since its semantics becomes ambiguous inpresence of max/min bounds. Loop normalization is currently unavailable forsuch loops.Depends On D101171Reviewed By: bondhugulaDifferential Revision: https://reviews.llvm.org/D101172
[mlir] Fix support for lowering non-32-bit affine reductions.The existing implementation was always creating 32-bit constants forfloating-point and integer reductions regardless of the actual type
[mlir] Fix support for lowering non-32-bit affine reductions.The existing implementation was always creating 32-bit constants forfloating-point and integer reductions regardless of the actual type, whichresulted in invalid IR being generated for any types other than f32 and i32when lowering affine.parallel to SCF. Use the actual type instead.Reviewed By: cheliniDifferential Revision: https://reviews.llvm.org/D99942
[mlir] add memref dialect as dependent of lower-affine passThe lower-affine pass also processes affine load and store operationsthat get converted to load and store operations now available in the
[mlir] add memref dialect as dependent of lower-affine passThe lower-affine pass also processes affine load and store operationsthat get converted to load and store operations now available in thememref dialect. Since it produces operations from the memref dialect,this dialect should be registered as dependent for this pass. It is rarebut possible to have code that doesn't have memref operations in theinput and calls this pass.Reviewed By: mehdi_aminiDifferential Revision: https://reviews.llvm.org/D99720
[MLIR] Fix lowering of Affine IfOp in the presence of yield values.This commit fixes the lowering of `Affine.IfOp` to `SCF.IfOp` in thepresence of yield values. These changes have been made as a p
[MLIR] Fix lowering of Affine IfOp in the presence of yield values.This commit fixes the lowering of `Affine.IfOp` to `SCF.IfOp` in thepresence of yield values. These changes have been made as a part of`-lower-affine` pass.Differential Revision: https://reviews.llvm.org/D98760
[MLIR] Create memref dialect and move dialect-specific ops from std.Create the memref dialect and move dialect-specific opsfrom std dialect to this dialect.Moved ops:AllocOp -> MemRef_AllocOpA
[MLIR] Create memref dialect and move dialect-specific ops from std.Create the memref dialect and move dialect-specific opsfrom std dialect to this dialect.Moved ops:AllocOp -> MemRef_AllocOpAllocaOp -> MemRef_AllocaOpAssumeAlignmentOp -> MemRef_AssumeAlignmentOpDeallocOp -> MemRef_DeallocOpDimOp -> MemRef_DimOpMemRefCastOp -> MemRef_CastOpMemRefReinterpretCastOp -> MemRef_ReinterpretCastOpGetGlobalMemRefOp -> MemRef_GetGlobalOpGlobalMemRefOp -> MemRef_GlobalOpLoadOp -> MemRef_LoadOpPrefetchOp -> MemRef_PrefetchOpReshapeOp -> MemRef_ReshapeOpStoreOp -> MemRef_StoreOpSubViewOp -> MemRef_SubViewOpTransposeOp -> MemRef_TransposeOpTensorLoadOp -> MemRef_TensorLoadOpTensorStoreOp -> MemRef_TensorStoreOpTensorToMemRefOp -> MemRef_BufferCastOpViewOp -> MemRef_ViewOpThe roadmap to split the memref dialect from std is discussed here:https://llvm.discourse.group/t/rfc-split-the-memref-dialect-from-std/2667Differential Revision: https://reviews.llvm.org/D98041
Revert "[MLIR] Create memref dialect and move several dialect-specific ops from std."This commit introduced a cyclic dependency:Memref dialect depends on Standard because it used ConstantIndexOp.
Revert "[MLIR] Create memref dialect and move several dialect-specific ops from std."This commit introduced a cyclic dependency:Memref dialect depends on Standard because it used ConstantIndexOp.Std depends on the MemRef dialect in its EDSC/Intrinsics.hWorking on a fix.This reverts commit 8aa6c3765b924d86f623d452777eb76b83bf2787.
[MLIR] Create memref dialect and move several dialect-specific ops from std.Create the memref dialect and move several dialect-specific ops withoutdependencies to other ops from std dialect to thi
[MLIR] Create memref dialect and move several dialect-specific ops from std.Create the memref dialect and move several dialect-specific ops withoutdependencies to other ops from std dialect to this dialect.Moved ops:AllocOp -> MemRef_AllocOpAllocaOp -> MemRef_AllocaOpDeallocOp -> MemRef_DeallocOpMemRefCastOp -> MemRef_CastOpGetGlobalMemRefOp -> MemRef_GetGlobalOpGlobalMemRefOp -> MemRef_GlobalOpPrefetchOp -> MemRef_PrefetchOpReshapeOp -> MemRef_ReshapeOpStoreOp -> MemRef_StoreOpTransposeOp -> MemRef_TransposeOpViewOp -> MemRef_ViewOpThe roadmap to split the memref dialect from std is discussed here:https://llvm.discourse.group/t/rfc-split-the-memref-dialect-from-std/2667Differential Revision: https://reviews.llvm.org/D96425
[mlir][Vector] Introduce 'vector.load' and 'vector.store' opsThis patch adds the 'vector.load' and 'vector.store' ops to the Vectordialect [1]. These operations model *contiguous* vector loads and
[mlir][Vector] Introduce 'vector.load' and 'vector.store' opsThis patch adds the 'vector.load' and 'vector.store' ops to the Vectordialect [1]. These operations model *contiguous* vector loads and storesfrom/to memory. Their semantics are similar to the 'affine.vector_load' and'affine.vector_store' counterparts but without the affine constraints. Themost relevant feature is that these new vector operations may perform a vectorload/store on memrefs with a non-vector element type, unlike 'std.load' and'std.store' ops. This opens the representation to model more generic vectorload/store scenarios: unaligned vector loads/stores, perform scalar and vectormemory access on the same memref, decouple memory allocation constraints frommemory accesses, etc [1]. These operations will also facilitate the progressivelowering of both Affine vector loads/stores and Vector transfer reads/writesfor those that read/write contiguous slices from/to memory.In particular, this patch adds the 'vector.load' and 'vector.store' ops to theVector dialect, implements their lowering to the LLVM dialect, and changes thelowering of 'affine.vector_load' and 'affine.vector_store' ops to the new vectorops. The lowering of Vector transfer reads/writes will be implemented in thefuture, probably as an independent pass. The API of 'vector.maskedload' and'vector.maskedstore' has also been changed slightly to align it with thetransfer read/write ops and the vector new ops. This will improve reusabilityamong all these operations. For example, the lowering of 'vector.load','vector.store', 'vector.maskedload' and 'vector.maskedstore' to the LLVM dialectis implemented with a single template conversion pattern.[1] https://llvm.discourse.group/t/memref-type-and-data-layout/Reviewed By: nicolasvasilacheDifferential Revision: https://reviews.llvm.org/D96185
[mlir][OpFormatGen] Format enum attribute cases as keywords when possibleIn the overwhelmingly common case, enum attribute case strings represent valid identifiers in MLIR syntax. This revision upd
[mlir][OpFormatGen] Format enum attribute cases as keywords when possibleIn the overwhelmingly common case, enum attribute case strings represent valid identifiers in MLIR syntax. This revision updates the format generator to format as a keyword in these cases, removing the need to wrap values in a string. The parser still retains the ability to parse the string form, but the printer will use the keyword form when applicable.Differential Revision: https://reviews.llvm.org/D94575
[MLIR] Fix lowering of affine operations with return valuesThis commit addresses the issue of lowering affine.for andaffine.parallel having return values. Relevant test cases are alsoadded.Sign
[MLIR] Fix lowering of affine operations with return valuesThis commit addresses the issue of lowering affine.for andaffine.parallel having return values. Relevant test cases are alsoadded.Signed-off-by: Prateek Gupta <[email protected]>Differential Revision: https://reviews.llvm.org/D93090
[MLIR] Extend Symbol verification to reject public symbol declarations.- Extend the Symbol interface with `isDeclaration` to identify operations that declare a symbol as opposed to define it.- E
[MLIR] Extend Symbol verification to reject public symbol declarations.- Extend the Symbol interface with `isDeclaration` to identify operations that declare a symbol as opposed to define it.- Extend verification to disallow public declarations as per the discussion in https://llvm.discourse.group/t/rfc-symbol-definition-declaration-x-visibility-checks/2140- Adopt the new interface for `FuncOp` and fix test and code to not have/create public function declarations.Differential Revision: https://reviews.llvm.org/D91456
[mlir][AffineToStandard] Make LowerAffine pass Op-agnostic.The LowerAffine psas was a FunctionPass only for legacyreasons. Making this Op-agnostic allows it to be used from commandline when affin
[mlir][AffineToStandard] Make LowerAffine pass Op-agnostic.The LowerAffine psas was a FunctionPass only for legacyreasons. Making this Op-agnostic allows it to be used from commandline when affine expressions are within operations other than`std.func`.Differential Revision: https://reviews.llvm.org/D84590
[MLIR] Add lowering for affine.parallel to scf.parallelAdd lowering conversion from affine.parallel to scf.parallel.Differential Revision: https://reviews.llvm.org/D83239
Enable FileCheck -enable-var-scope by default in MLIR testThis option avoids to accidentally reuse variable across -LABEL match,it can be explicitly opted-in by prefixing the variable name with $
Enable FileCheck -enable-var-scope by default in MLIR testThis option avoids to accidentally reuse variable across -LABEL match,it can be explicitly opted-in by prefixing the variable name with $Differential Revision: https://reviews.llvm.org/D81531
[mlir][Vector] Make minor identity permutation map optional in transfer op printing and parsingSummary:This revision makes the use of vector transfer operatons more idiomatic byallowing to omit a
[mlir][Vector] Make minor identity permutation map optional in transfer op printing and parsingSummary:This revision makes the use of vector transfer operatons more idiomatic byallowing to omit and inferring the permutation_map.Differential Revision: https://reviews.llvm.org/D80092
[mlir][Affine] Introduce affine.vector_load and affine.vector_storeThis patch adds `affine.vector_load` and `affine.vector_store` ops tothe Affine dialect and lowers them to `vector.transfer_read`
[mlir][Affine] Introduce affine.vector_load and affine.vector_storeThis patch adds `affine.vector_load` and `affine.vector_store` ops tothe Affine dialect and lowers them to `vector.transfer_read` and`vector.transfer_write`, respectively, in the Vector dialect.Reviewed By: bondhugula, nicolasvasilacheDifferential Revision: https://reviews.llvm.org/D79658
[mlir] NFC: Fix trivial typoDifferential Revision: https://reviews.llvm.org/D77473
[MLIR] Add method to drop duplicate result exprs from AffineMapAdd a method that given an affine map returns another with just its uniqueresults. Use this to drop redundant bounds in max/min for a
[MLIR] Add method to drop duplicate result exprs from AffineMapAdd a method that given an affine map returns another with just its uniqueresults. Use this to drop redundant bounds in max/min for affine.for. Updateaffine.for's canonicalization pattern and createCanonicalizedForOp to usethis.Differential Revision: https://reviews.llvm.org/D77237
[MLIR][NFC] Move test/Transforms/lower-affine.mlir -> test/ConversionMove lower-affine.mlir from test/Transforms totest/Conversion/AffineToStandard/. Other related NFC.Signed-off-by: Uday Bondhu
[MLIR][NFC] Move test/Transforms/lower-affine.mlir -> test/ConversionMove lower-affine.mlir from test/Transforms totest/Conversion/AffineToStandard/. Other related NFC.Signed-off-by: Uday Bondhugula <[email protected]>Differential Revision: https://reviews.llvm.org/D77008