[mlir][spirv] Replace StructAttrs with AttrDefsDepends on D127370Reviewed By: antiagainstDifferential Revision: https://reviews.llvm.org/D127373
[mlir][spirv] Remove layout decoration on unneeded storage classesPer SPIR-V validation rules, explict layout decorations are onlyneeded for StorageBuffer, PhysicalStorageBuffer, Uniform, andPush
[mlir][spirv] Remove layout decoration on unneeded storage classesPer SPIR-V validation rules, explict layout decorations are onlyneeded for StorageBuffer, PhysicalStorageBuffer, Uniform, andPushConstant storage classes. (And even that is for Shadercapabilities). So we don't need such decorations on the rest.Reviewed By: hanchungDifferential Revision: https://reviews.llvm.org/D124543
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][gpu] Introduce gpu.global_id opIntroduce OpenCL-style global_id op and corresponding spirv lowering.Differential Revision: https://reviews.llvm.org/D121548
[mlir][spirv] Make EntryPointABIAttr.local_size optional* It doesn't required by OpenCL/Intel Level Zero and can be set programmatically.* Add GPU to spirv lowering in case when attribute is not p
[mlir][spirv] Make EntryPointABIAttr.local_size optional* It doesn't required by OpenCL/Intel Level Zero and can be set programmatically.* Add GPU to spirv lowering in case when attribute is not present.* Set higher benefit to WorkGroupSizeConversion pattern so it will always try to lower first from the attribute.Differential Revision: https://reviews.llvm.org/D120399
[mlir][spirv] Convert gpu.barrier to spv.ControlBarrierReviewed By: ThomasRaouxDifferential Revision: https://reviews.llvm.org/D120722
[mlir] Replace StrEnumAttr -> EnumAttr in core dialectsRemoves uses of `StrEnumAttr` in core dialectsReviewed By: mehdi_amini, rriddleDifferential Revision: https://reviews.llvm.org/D117514
[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][GPU] Add GPU launch op support for dynamic shared memoryAdd support for dynamic shared memory for GPU launch ops: add anoptional operand to gpu.launch and gpu.launch_func ops to specify the
[MLIR][GPU] Add GPU launch op support for dynamic shared memoryAdd support for dynamic shared memory for GPU launch ops: add anoptional operand to gpu.launch and gpu.launch_func ops to specify theamount of "dynamic" shared memory to use. Update lowerings to connectthis operand to the GPU runtime.Differential Revision: https://reviews.llvm.org/D110800
[mlir][spirv] Only attach struct offset for required storage classesPer the SPIR-V spec "2.16.2. Validation Rules for Shader Capabilities": Composite objects in the StorageBuffer, PhysicalStorag
[mlir][spirv] Only attach struct offset for required storage classesPer the SPIR-V spec "2.16.2. Validation Rules for Shader Capabilities": Composite objects in the StorageBuffer, PhysicalStorageBuffer, Uniform, and PushConstant Storage Classes must be explicitly laid out.For other cases we don't need to attach the struct offsets.Reviewed By: hanchungDifferential Revision: https://reviews.llvm.org/D100386
[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
[MLIR][SPIRV] Rename `spv.globalVariable` to `spv.GlobalVariable`.To unify the naming scheme across all ops in the SPIR-V dialect, we aremoving from spv.camelCase to spv.CamelCase everywhere.Rev
[MLIR][SPIRV] Rename `spv.globalVariable` to `spv.GlobalVariable`.To unify the naming scheme across all ops in the SPIR-V dialect, we aremoving from spv.camelCase to spv.CamelCase everywhere.Reviewed By: antiagainstDifferential Revision: https://reviews.llvm.org/D97919
[MLIR][SPIRV] Rename `spv.constant` to `spv.Constant`.To unify the naming scheme across all ops in the SPIR-V dialect, we aremoving from `spv.camelCase` to `spv.CamelCase` everywhere.Reviewed By
[MLIR][SPIRV] Rename `spv.constant` to `spv.Constant`.To unify the naming scheme across all ops in the SPIR-V dialect, we aremoving from `spv.camelCase` to `spv.CamelCase` everywhere.Reviewed By: antiagainstDifferential Revision: https://reviews.llvm.org/D97917
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][spirv] Create a pass for testing SCFToSPIRV patternsPreviously all SCF to SPIR-V conversion patterns were tested asthe -convert-gpu-to-spirv pass. That obscured the structure wewant. This
[mlir][spirv] Create a pass for testing SCFToSPIRV patternsPreviously all SCF to SPIR-V conversion patterns were tested asthe -convert-gpu-to-spirv pass. That obscured the structure wewant. This commit fixed it.Reviewed By: ThomasRaoux, hanchungDifferential Revision: https://reviews.llvm.org/D93488
[MLIR][SPIRV] Rename `spv._merge` to `spv.mlir.merge`This commit does the renaming mentioned in the title in order to bring'spv' dialect closer to the MLIR naming conventions.Reviewed By: antiag
[MLIR][SPIRV] Rename `spv._merge` to `spv.mlir.merge`This commit does the renaming mentioned in the title in order to bring'spv' dialect closer to the MLIR naming conventions.Reviewed By: antiagainstDifferential Revision: https://reviews.llvm.org/D91797
[MLIR][SPIRV] Rename `spv._address_of` to `spv.mlir.addressof`This commit does the renaming mentioned in the title in order to bring`spv` dialect closer to the MLIR naming conventions.Reviewed B
[MLIR][SPIRV] Rename `spv._address_of` to `spv.mlir.addressof`This commit does the renaming mentioned in the title in order to bring`spv` dialect closer to the MLIR naming conventions.Reviewed By: antiagainstDifferential Revision: https://reviews.llvm.org/D91609
[mlir][gpu] NFC: switch occurrences of gpu.launch_func to custom format.Reviewed By: herhutDifferential Revision: https://reviews.llvm.org/D89929
[MLIR][SPIRV] Support identified and recursive structs.This PR adds support for identified and recursive structs.This includes: parsing, printing, serializing, anddeserializing such structs.The
[MLIR][SPIRV] Support identified and recursive structs.This PR adds support for identified and recursive structs.This includes: parsing, printing, serializing, anddeserializing such structs.The following C struct:```Cstruct A { A* next;};```which is translated to the following MLIR code as:```mlir!spv.struct<A, (!spv.ptr<!spv.struct<A>, Generic>)>```would be represented in the SPIR-V module as:```spirvOpName %A "A"OpTypeForwardPointer %APtr Generic%A = OpTypeStruct %APtr%APtr = OpTypePointer Generic %A```In particular the following changes are included:- SPIR-V structs can now be either identified or literal (i.e. non-identified).- All structs now have their members surrounded by a ()-pair.- For recursive references, (1) an OpTypeForwardPointer instruction is emitted before the OpTypeStruct instruction defining the recursive struct (2) an OpTypePointer instruction is emitted after the OpTypeStruct instruction which actually defines the recursive pointer to struct type.Reviewed By: antiagainst, rriddle, ftynseDifferential Revision: https://reviews.llvm.org/D87206
[spirv][nfc] Simplify resource limit with default valuesThese deafult values are gotten from Vulkan required limits.Reviewed By: hanchungDifferential Revision: https://reviews.llvm.org/D87090
[MLIR][GPUToSPIRV] Passing gpu module name to SPIR-V moduleThis patch allows to pass the gpu module name to SPIR-Vmodule during conversion. This has many benefits as we can lookupconverted to SPI
[MLIR][GPUToSPIRV] Passing gpu module name to SPIR-V moduleThis patch allows to pass the gpu module name to SPIR-Vmodule during conversion. This has many benefits as we can lookupconverted to SPIR-V kernel in the symbol table.In order to avoid symbol conflicts, `"__spv__"` is added to thegpu module name to form the new one.Reviewed By: mravishankarDifferential Revision: https://reviews.llvm.org/D86384
[mlir][spirv] Add correct handling of Kernel and Addresses capabilitiesThis change adds initial support needed to generate OpenCL compliant SPIRV.If Kernel capability is declared then memory model
[mlir][spirv] Add correct handling of Kernel and Addresses capabilitiesThis change adds initial support needed to generate OpenCL compliant SPIRV.If Kernel capability is declared then memory model becomes OpenCL.If Addresses capability is declared then addressing model becomes Physical64.Additionally for Kernel capability interface variable ABI attributes are notgenerated as entry point function is expected to have normal arguments.Differential Revision: https://reviews.llvm.org/D85196
[mlir][GPUToSPIRV] Add a test pass to set workgroup size for kernelfunctions.This allows using command line flags to lowere from GPU to SPIR-V. Thepass added is only for testing/example purposes.
[mlir][GPUToSPIRV] Add a test pass to set workgroup size for kernelfunctions.This allows using command line flags to lowere from GPU to SPIR-V. Thepass added is only for testing/example purposes. Most uses cases willneed more fine-grained control on setting workgroup sizes for kernelfunctions.Differential Revision: https://reviews.llvm.org/D84619
[mlir][NFC] Remove usernames and google bug numbers from TODO comments.These were largely leftover from when MLIR was a google project, and don't really follow LLVM guidelines.
123