[Mlir-commits] [mlir] 817de30 - [mlir][spirv] Change vendor op mnemonics to `spv.VENDOR.name`
Jakub Kuderski
llvmlistbot at llvm.org
Tue Sep 6 10:36:02 PDT 2022
Author: Jakub Kuderski
Date: 2022-09-06T13:35:08-04:00
New Revision: 817de304d541d02047e4684f77bf46956d009f04
URL: https://github.com/llvm/llvm-project/commit/817de304d541d02047e4684f77bf46956d009f04
DIFF: https://github.com/llvm/llvm-project/commit/817de304d541d02047e4684f77bf46956d009f04.diff
LOG: [mlir][spirv] Change vendor op mnemonics to `spv.VENDOR.name`
Make vendor ops more consistent with the naming scheme within the SPIR-V
dialect.
Issue: https://github.com/llvm/llvm-project/issues/56863
Reviewed By: antiagainst
Differential Revision: https://reviews.llvm.org/D133247
Added:
Modified:
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVAtomicOps.td
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCooperativeMatrixOps.td
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGroupOps.td
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVJointMatrixOps.td
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVMiscOps.td
mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp
mlir/test/Dialect/SPIRV/IR/atomic-ops.mlir
mlir/test/Dialect/SPIRV/IR/cooperative-matrix-ops.mlir
mlir/test/Dialect/SPIRV/IR/group-ops.mlir
mlir/test/Dialect/SPIRV/IR/joint-matrix-ops.mlir
mlir/test/Dialect/SPIRV/IR/misc-ops.mlir
mlir/test/Dialect/SPIRV/IR/target-env.mlir
mlir/test/Dialect/SPIRV/Transforms/vce-deduction.mlir
mlir/test/Target/SPIRV/atomic-ops.mlir
mlir/test/Target/SPIRV/cooperative-matrix-ops.mlir
mlir/test/Target/SPIRV/group-ops.mlir
mlir/test/Target/SPIRV/joint-matrix-ops.mlir
mlir/test/lib/Dialect/SPIRV/TestAvailability.cpp
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVAtomicOps.td b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVAtomicOps.td
index ba9d5a7223297..275ee45f17752 100644
--- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVAtomicOps.td
+++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVAtomicOps.td
@@ -290,14 +290,14 @@ def SPV_EXTAtomicFAddOp : SPV_ExtVendorOp<"AtomicFAdd", []> {
```
atomic-fadd-op ::=
- `spv.AtomicFAddEXT` scope memory-semantics
+ `spv.EXT.AtomicFAdd` scope memory-semantics
ssa-use `,` ssa-use `:` spv-pointer-type
```
#### Example:
```mlir
- %0 = spv.AtomicFAddEXT "Device" "None" %pointer, %value :
+ %0 = spv.EXT.AtomicFAdd "Device" "None" %pointer, %value :
!spv.ptr<f32, StorageBuffer>
```mlir
}];
diff --git a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
index afe1185906292..d27ee36b533f9 100644
--- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
+++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
@@ -4545,7 +4545,7 @@ class SPV_ExtInstOp<string mnemonic, string setPrefix, string setName,
// Op<Name><VENDOR>, e.g., OpCooperativeMatrixStoreNV.
class SPV_VendorOp<string mnemonic, string vendorName,
list<Trait> traits = []> :
- SPV_Op<mnemonic # vendorName, traits> {
+ SPV_Op<vendorName # "." # mnemonic, traits> {
string spirvOpName = "Op" # mnemonic # vendorName;
}
diff --git a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCooperativeMatrixOps.td b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCooperativeMatrixOps.td
index bff4543c526e1..fd94b98205a8c 100644
--- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCooperativeMatrixOps.td
+++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCooperativeMatrixOps.td
@@ -28,14 +28,14 @@ def SPV_NVCooperativeMatrixLengthOp : SPV_NvVendorOp<"CooperativeMatrixLength",
Type is a cooperative matrix type.
``` {.ebnf}
- cooperative-matrix-length-op ::= ssa-id `=` `spv.CooperativeMatrixLengthNV
+ cooperative-matrix-length-op ::= ssa-id `=` `spv.NV.CooperativeMatrixLength
` : ` cooperative-matrix-type
```
For example:
```
- %0 = spv.CooperativeMatrixLengthNV : !spv.coopmatrix<Subgroup, i32, 8, 16>
+ %0 = spv.NV.CooperativeMatrixLength : !spv.coopmatrix<Subgroup, i32, 8, 16>
```
}];
@@ -100,7 +100,7 @@ def SPV_NVCooperativeMatrixLoadOp : SPV_NvVendorOp<"CooperativeMatrixLoad", []>
### Custom assembly form
``` {.ebnf}
- cooperative-matrixload-op ::= ssa-id `=` `spv.CooperativeMatrixLoadNV`
+ cooperative-matrixload-op ::= ssa-id `=` `spv.NV.CooperativeMatrixLoad`
ssa-use `,` ssa-use `,` ssa-use
(`[` memory-access `]`)? ` : `
pointer-type `as`
@@ -110,7 +110,7 @@ def SPV_NVCooperativeMatrixLoadOp : SPV_NvVendorOp<"CooperativeMatrixLoad", []>
For example:
```
- %0 = spv.CooperativeMatrixLoadNV %ptr, %stride, %colMajor
+ %0 = spv.NV.CooperativeMatrixLoad %ptr, %stride, %colMajor
: !spv.ptr<i32, StorageBuffer> as !spv.coopmatrix<i32, Workgroup, 16, 8>
```
}];
@@ -172,7 +172,7 @@ def SPV_NVCooperativeMatrixMulAddOp : SPV_NvVendorOp<"CooperativeMatrixMulAdd",
the scope of the operation).
``` {.ebnf}
- cooperative-matrixmuladd-op ::= ssa-id `=` `spv.CooperativeMatrixMulAddNV`
+ cooperative-matrixmuladd-op ::= ssa-id `=` `spv.NV.CooperativeMatrixMulAdd`
ssa-use `,` ssa-use `,` ssa-use ` : `
a-cooperative-matrix-type,
b-cooperative-matrix-type ->
@@ -181,7 +181,7 @@ def SPV_NVCooperativeMatrixMulAddOp : SPV_NvVendorOp<"CooperativeMatrixMulAdd",
For example:
```
- %0 = spv.CooperativeMatrixMulAddNV %arg0, %arg1, %arg2, :
+ %0 = spv.NV.CooperativeMatrixMulAdd %arg0, %arg1, %arg2, :
!spv.coopmatrix<Subgroup, i32, 8, 16>
```
}];
@@ -236,7 +236,7 @@ def SPV_NVCooperativeMatrixStoreOp : SPV_NvVendorOp<"CooperativeMatrixStore", []
same as specifying None.
``` {.ebnf}
- coop-matrix-store-op ::= `spv.CooperativeMatrixStoreNV `
+ coop-matrix-store-op ::= `spv.NV.CooperativeMatrixStore `
ssa-use `, ` ssa-use `, `
ssa-use `, ` ssa-use `, `
(`[` memory-access `]`)? `:`
@@ -246,7 +246,7 @@ def SPV_NVCooperativeMatrixStoreOp : SPV_NvVendorOp<"CooperativeMatrixStore", []
For example:
```
- spv.CooperativeMatrixStoreNV %arg0, %arg2, %arg1, %arg3 :
+ spv.NV.CooperativeMatrixStore %arg0, %arg2, %arg1, %arg3 :
!spv.ptr<i32, StorageBuffer>, !spv.coopmatrix<Workgroup, i32, 16, 8>
```
}];
diff --git a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGroupOps.td b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGroupOps.td
index e640824133226..40d91aa0038b2 100644
--- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGroupOps.td
+++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGroupOps.td
@@ -113,14 +113,14 @@ def SPV_KHRSubgroupBallotOp : SPV_KhrVendorOp<"SubgroupBallot", []> {
<!-- End of AutoGen section -->
```
- subgroup-ballot-op ::= ssa-id `=` `spv.SubgroupBallotKHR`
+ subgroup-ballot-op ::= ssa-id `=` `spv.KHR.SubgroupBallot`
ssa-use `:` `vector` `<` 4 `x` `i32` `>`
```
#### Example:
```mlir
- %0 = spv.SubgroupBallotKHR %predicate : vector<4xi32>
+ %0 = spv.KHR.SubgroupBallot %predicate : vector<4xi32>
```
}];
@@ -168,14 +168,14 @@ def SPV_INTELSubgroupBlockReadOp : SPV_IntelVendorOp<"SubgroupBlockRead", []> {
<!-- End of AutoGen section -->
```
- subgroup-block-read-INTEL-op ::= ssa-id `=` `spv.SubgroupBlockReadINTEL`
+ subgroup-block-read-INTEL-op ::= ssa-id `=` `spv.INTEL.SubgroupBlockRead`
storage-class ssa_use `:` spirv-element-type
```mlir
#### Example:
```
- %0 = spv.SubgroupBlockReadINTEL "StorageBuffer" %ptr : i32
+ %0 = spv.INTEL.SubgroupBlockRead "StorageBuffer" %ptr : i32
```
}];
@@ -218,14 +218,14 @@ def SPV_INTELSubgroupBlockWriteOp : SPV_IntelVendorOp<"SubgroupBlockWrite", []>
<!-- End of AutoGen section -->
```
- subgroup-block-write-INTEL-op ::= ssa-id `=` `spv.SubgroupBlockWriteINTEL`
+ subgroup-block-write-INTEL-op ::= ssa-id `=` `spv.INTEL.SubgroupBlockWrite`
storage-class ssa_use `,` ssa-use `:` spirv-element-type
```mlir
#### Example:
```
- spv.SubgroupBlockWriteINTEL "StorageBuffer" %ptr, %value : i32
+ spv.INTEL.SubgroupBlockWrite "StorageBuffer" %ptr, %value : i32
```
}];
diff --git a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVJointMatrixOps.td b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVJointMatrixOps.td
index e95be56f26750..7419f63c747aa 100644
--- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVJointMatrixOps.td
+++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVJointMatrixOps.td
@@ -28,14 +28,14 @@ def SPV_INTELJointMatrixWorkItemLengthOp : SPV_IntelVendorOp<"JointMatrixWorkIte
Type is a joint matrix type.
``` {.ebnf}
- joint-matrix-length-op ::= ssa-id `=` `spv.JointMatrixWorkItemLengthINTEL
+ joint-matrix-length-op ::= ssa-id `=` `spv.INTEL.JointMatrixWorkItemLength
` : ` joint-matrix-type
```
For example:
```
- %0 = spv.JointMatrixWorkItemLengthINTEL : !spv.jointmatrix<Subgroup, i32, 8, 16>
+ %0 = spv.INTEL.JointMatrixWorkItemLength : !spv.jointmatrix<Subgroup, i32, 8, 16>
```
}];
@@ -85,7 +85,7 @@ def SPV_INTELJointMatrixLoadOp : SPV_IntelVendorOp<"JointMatrixLoad", []> {
#### Example:
```mlir
- %0 = spv.JointMatrixLoadINTEL <Subgroup> <RowMajor> %ptr, %stride
+ %0 = spv.INTEL.JointMatrixLoad <Subgroup> <RowMajor> %ptr, %stride
{memory_access = #spv.memory_access<Volatile>} :
(!spv.ptr<i32, CrossWorkgroup>, i32) ->
!spv.jointmatrix<8x16xi32, ColumnMajor, Subgroup>
@@ -149,7 +149,7 @@ def SPV_INTELJointMatrixMadOp : SPV_IntelVendorOp<"JointMatrixMad",
#### Example:
```mlir
- %r = spv.JointMatrixMadINTEL <Subgroup> %a, %b, %c :
+ %r = spv.INTEL.JointMatrixMad <Subgroup> %a, %b, %c :
!spv.jointmatrix<8x32xi8, RowMajor, Subgroup>,
!spv.jointmatrix<32x8xi8, ColumnMajor, Subgroup>
-> !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>
@@ -212,7 +212,7 @@ def SPV_INTELJointMatrixStoreOp : SPV_IntelVendorOp<"JointMatrixStore", []> {
#### Example:
```mlir
- spv.JointMatrixStoreINTEL <Subgroup> <ColumnMajor> %ptr, %m, %stride
+ spv.INTEL.JointMatrixStore <Subgroup> <ColumnMajor> %ptr, %m, %stride
{memory_access = #spv.memory_access<Volatile>} : (!spv.ptr<i32, Workgroup>,
!spv.jointmatrix<8x16xi32, RowMajor, Subgroup>, i32)
```
diff --git a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVMiscOps.td b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVMiscOps.td
index d514f363137ec..7ef33c9a09e85 100644
--- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVMiscOps.td
+++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVMiscOps.td
@@ -27,13 +27,13 @@ def SPV_KHRAssumeTrueOp : SPV_KhrVendorOp<"AssumeTrue", []> {
<!-- End of AutoGen section -->
```
- assumetruekhr-op ::= `spv.AssumeTrueKHR` ssa-use
+ assumetruekhr-op ::= `spv.KHR.AssumeTrue` ssa-use
```mlir
#### Example:
```
- spv.AssumeTrueKHR %arg
+ spv.KHR.AssumeTrue %arg
```
}];
diff --git a/mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp b/mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp
index 7cb7588b5379a..bfdc244903162 100644
--- a/mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp
+++ b/mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp
@@ -1332,7 +1332,7 @@ void spirv::AtomicIAddOp::print(OpAsmPrinter &p) {
}
//===----------------------------------------------------------------------===//
-// spv.AtomicFAddEXTOp
+// spv.EXT.AtomicFAddOp
//===----------------------------------------------------------------------===//
LogicalResult spirv::EXTAtomicFAddOp::verify() {
@@ -2643,7 +2643,7 @@ LogicalResult spirv::GroupNonUniformShuffleXorOp::verify() {
}
//===----------------------------------------------------------------------===//
-// spv.SubgroupBlockReadINTEL
+// spv.INTEL.SubgroupBlockRead
//===----------------------------------------------------------------------===//
ParseResult spirv::INTELSubgroupBlockReadOp::parse(OpAsmParser &parser,
@@ -2681,7 +2681,7 @@ LogicalResult spirv::INTELSubgroupBlockReadOp::verify() {
}
//===----------------------------------------------------------------------===//
-// spv.SubgroupBlockWriteINTEL
+// spv.INTEL.SubgroupBlockWrite
//===----------------------------------------------------------------------===//
ParseResult spirv::INTELSubgroupBlockWriteOp::parse(OpAsmParser &parser,
@@ -3813,7 +3813,7 @@ LogicalResult spirv::VectorShuffleOp::verify() {
}
//===----------------------------------------------------------------------===//
-// spv.CooperativeMatrixLoadNV
+// spv.NV.CooperativeMatrixLoad
//===----------------------------------------------------------------------===//
ParseResult spirv::NVCooperativeMatrixLoadOp::parse(OpAsmParser &parser,
@@ -3871,7 +3871,7 @@ LogicalResult spirv::NVCooperativeMatrixLoadOp::verify() {
}
//===----------------------------------------------------------------------===//
-// spv.CooperativeMatrixStoreNV
+// spv.NV.CooperativeMatrixStore
//===----------------------------------------------------------------------===//
ParseResult spirv::NVCooperativeMatrixStoreOp::parse(OpAsmParser &parser,
@@ -3911,7 +3911,7 @@ LogicalResult spirv::NVCooperativeMatrixStoreOp::verify() {
}
//===----------------------------------------------------------------------===//
-// spv.CooperativeMatrixMulAddNV
+// spv.NV.CooperativeMatrixMulAdd
//===----------------------------------------------------------------------===//
static LogicalResult
@@ -3960,7 +3960,7 @@ verifyPointerAndJointMatrixType(Operation *op, Type pointer, Type jointMatrix) {
}
//===----------------------------------------------------------------------===//
-// spv.JointMatrixLoadINTEL
+// spv.INTEL.JointMatrixLoad
//===----------------------------------------------------------------------===//
LogicalResult spirv::INTELJointMatrixLoadOp::verify() {
@@ -3969,7 +3969,7 @@ LogicalResult spirv::INTELJointMatrixLoadOp::verify() {
}
//===----------------------------------------------------------------------===//
-// spv.JointMatrixStoreINTEL
+// spv.INTEL.JointMatrixStore
//===----------------------------------------------------------------------===//
LogicalResult spirv::INTELJointMatrixStoreOp::verify() {
@@ -3978,7 +3978,7 @@ LogicalResult spirv::INTELJointMatrixStoreOp::verify() {
}
//===----------------------------------------------------------------------===//
-// spv.JointMatrixMadINTEL
+// spv.INTEL.JointMatrixMad
//===----------------------------------------------------------------------===//
static LogicalResult verifyJointMatrixMad(spirv::INTELJointMatrixMadOp op) {
diff --git a/mlir/test/Dialect/SPIRV/IR/atomic-ops.mlir b/mlir/test/Dialect/SPIRV/IR/atomic-ops.mlir
index 9889422fa31b8..30732d84fc0a9 100644
--- a/mlir/test/Dialect/SPIRV/IR/atomic-ops.mlir
+++ b/mlir/test/Dialect/SPIRV/IR/atomic-ops.mlir
@@ -240,12 +240,12 @@ func.func @atomic_xor(%ptr : !spv.ptr<i32, StorageBuffer>, %value : i32) -> i32
// -----
//===----------------------------------------------------------------------===//
-// spv.AtomicFAddEXT
+// spv.EXT.AtomicFAdd
//===----------------------------------------------------------------------===//
func.func @atomic_fadd(%ptr : !spv.ptr<f32, StorageBuffer>, %value : f32) -> f32 {
- // CHECK: spv.AtomicFAddEXT "Device" "None" %{{.*}}, %{{.*}} : !spv.ptr<f32, StorageBuffer>
- %0 = spv.AtomicFAddEXT "Device" "None" %ptr, %value : !spv.ptr<f32, StorageBuffer>
+ // CHECK: spv.EXT.AtomicFAdd "Device" "None" %{{.*}}, %{{.*}} : !spv.ptr<f32, StorageBuffer>
+ %0 = spv.EXT.AtomicFAdd "Device" "None" %ptr, %value : !spv.ptr<f32, StorageBuffer>
return %0 : f32
}
@@ -253,7 +253,7 @@ func.func @atomic_fadd(%ptr : !spv.ptr<f32, StorageBuffer>, %value : f32) -> f32
func.func @atomic_fadd(%ptr : !spv.ptr<i32, StorageBuffer>, %value : f32) -> f32 {
// expected-error @+1 {{pointer operand must point to an float value, found 'i32'}}
- %0 = "spv.AtomicFAddEXT"(%ptr, %value) {memory_scope = #spv.scope<Workgroup>, semantics = #spv.memory_semantics<AcquireRelease>} : (!spv.ptr<i32, StorageBuffer>, f32) -> (f32)
+ %0 = "spv.EXT.AtomicFAdd"(%ptr, %value) {memory_scope = #spv.scope<Workgroup>, semantics = #spv.memory_semantics<AcquireRelease>} : (!spv.ptr<i32, StorageBuffer>, f32) -> (f32)
return %0 : f32
}
@@ -261,7 +261,7 @@ func.func @atomic_fadd(%ptr : !spv.ptr<i32, StorageBuffer>, %value : f32) -> f32
func.func @atomic_fadd(%ptr : !spv.ptr<f32, StorageBuffer>, %value : f64) -> f64 {
// expected-error @+1 {{expected value to have the same type as the pointer operand's pointee type 'f32', but found 'f64'}}
- %0 = "spv.AtomicFAddEXT"(%ptr, %value) {memory_scope = #spv.scope<Device>, semantics = #spv.memory_semantics<AcquireRelease>} : (!spv.ptr<f32, StorageBuffer>, f64) -> (f64)
+ %0 = "spv.EXT.AtomicFAdd"(%ptr, %value) {memory_scope = #spv.scope<Device>, semantics = #spv.memory_semantics<AcquireRelease>} : (!spv.ptr<f32, StorageBuffer>, f64) -> (f64)
return %0 : f64
}
@@ -269,6 +269,6 @@ func.func @atomic_fadd(%ptr : !spv.ptr<f32, StorageBuffer>, %value : f64) -> f64
func.func @atomic_fadd(%ptr : !spv.ptr<f32, StorageBuffer>, %value : f32) -> f32 {
// expected-error @+1 {{expected at most one of these four memory constraints to be set: `Acquire`, `Release`,`AcquireRelease` or `SequentiallyConsistent`}}
- %0 = spv.AtomicFAddEXT "Device" "Acquire|Release" %ptr, %value : !spv.ptr<f32, StorageBuffer>
+ %0 = spv.EXT.AtomicFAdd "Device" "Acquire|Release" %ptr, %value : !spv.ptr<f32, StorageBuffer>
return %0 : f32
}
diff --git a/mlir/test/Dialect/SPIRV/IR/cooperative-matrix-ops.mlir b/mlir/test/Dialect/SPIRV/IR/cooperative-matrix-ops.mlir
index 7de8a36183c7c..ce90d0ac09d41 100644
--- a/mlir/test/Dialect/SPIRV/IR/cooperative-matrix-ops.mlir
+++ b/mlir/test/Dialect/SPIRV/IR/cooperative-matrix-ops.mlir
@@ -2,51 +2,51 @@
// CHECK-LABEL: @cooperative_matrix_load
spv.func @cooperative_matrix_load(%ptr : !spv.ptr<i32, StorageBuffer>, %stride : i32, %b : i1) "None" {
- // CHECK: {{%.*}} = spv.CooperativeMatrixLoadNV {{%.*}}, {{%.*}}, {{%.*}} : !spv.ptr<i32, StorageBuffer> as !spv.coopmatrix<16x8xi32, Workgroup>
- %0 = spv.CooperativeMatrixLoadNV %ptr, %stride, %b : !spv.ptr<i32, StorageBuffer> as !spv.coopmatrix<16x8xi32, Workgroup>
+ // CHECK: {{%.*}} = spv.NV.CooperativeMatrixLoad {{%.*}}, {{%.*}}, {{%.*}} : !spv.ptr<i32, StorageBuffer> as !spv.coopmatrix<16x8xi32, Workgroup>
+ %0 = spv.NV.CooperativeMatrixLoad %ptr, %stride, %b : !spv.ptr<i32, StorageBuffer> as !spv.coopmatrix<16x8xi32, Workgroup>
spv.Return
}
// -----
// CHECK-LABEL: @cooperative_matrix_load_memaccess
spv.func @cooperative_matrix_load_memaccess(%ptr : !spv.ptr<i32, StorageBuffer>, %stride : i32, %b : i1) "None" {
- // CHECK: {{%.*}} = spv.CooperativeMatrixLoadNV {{%.*}}, {{%.*}}, {{%.*}} ["Volatile"] : !spv.ptr<i32, StorageBuffer> as !spv.coopmatrix<8x16xi32, Subgroup>
- %0 = spv.CooperativeMatrixLoadNV %ptr, %stride, %b ["Volatile"] : !spv.ptr<i32, StorageBuffer> as !spv.coopmatrix<8x16xi32, Subgroup>
+ // CHECK: {{%.*}} = spv.NV.CooperativeMatrixLoad {{%.*}}, {{%.*}}, {{%.*}} ["Volatile"] : !spv.ptr<i32, StorageBuffer> as !spv.coopmatrix<8x16xi32, Subgroup>
+ %0 = spv.NV.CooperativeMatrixLoad %ptr, %stride, %b ["Volatile"] : !spv.ptr<i32, StorageBuffer> as !spv.coopmatrix<8x16xi32, Subgroup>
spv.Return
}
// CHECK-LABEL: @cooperative_matrix_load_
diff _ptr_type
spv.func @cooperative_matrix_load_
diff _ptr_type(%ptr : !spv.ptr<vector<4xi32>, StorageBuffer>, %stride : i32, %b : i1) "None" {
- // CHECK: {{%.*}} = spv.CooperativeMatrixLoadNV {{%.*}}, {{%.*}}, {{%.*}} ["Volatile"] : !spv.ptr<vector<4xi32>, StorageBuffer> as !spv.coopmatrix<8x16xi32, Subgroup>
- %0 = spv.CooperativeMatrixLoadNV %ptr, %stride, %b ["Volatile"] : !spv.ptr<vector<4xi32>, StorageBuffer> as !spv.coopmatrix<8x16xi32, Subgroup>
+ // CHECK: {{%.*}} = spv.NV.CooperativeMatrixLoad {{%.*}}, {{%.*}}, {{%.*}} ["Volatile"] : !spv.ptr<vector<4xi32>, StorageBuffer> as !spv.coopmatrix<8x16xi32, Subgroup>
+ %0 = spv.NV.CooperativeMatrixLoad %ptr, %stride, %b ["Volatile"] : !spv.ptr<vector<4xi32>, StorageBuffer> as !spv.coopmatrix<8x16xi32, Subgroup>
spv.Return
}
// CHECK-LABEL: @cooperative_matrix_store
spv.func @cooperative_matrix_store(%ptr : !spv.ptr<i32, StorageBuffer>, %stride : i32, %m : !spv.coopmatrix<8x16xi32, Workgroup>, %b : i1) "None" {
- // CHECK: spv.CooperativeMatrixStoreNV {{%.*}}, {{%.*}}, {{%.*}} : !spv.ptr<i32, StorageBuffer>, !spv.coopmatrix<8x16xi32, Workgroup>
- spv.CooperativeMatrixStoreNV %ptr, %m, %stride, %b : !spv.ptr<i32, StorageBuffer>, !spv.coopmatrix<8x16xi32, Workgroup>
+ // CHECK: spv.NV.CooperativeMatrixStore {{%.*}}, {{%.*}}, {{%.*}} : !spv.ptr<i32, StorageBuffer>, !spv.coopmatrix<8x16xi32, Workgroup>
+ spv.NV.CooperativeMatrixStore %ptr, %m, %stride, %b : !spv.ptr<i32, StorageBuffer>, !spv.coopmatrix<8x16xi32, Workgroup>
spv.Return
}
// CHECK-LABEL: @cooperative_matrix_store_memaccess
spv.func @cooperative_matrix_store_memaccess(%ptr : !spv.ptr<i32, StorageBuffer>, %m : !spv.coopmatrix<8x16xi32, Subgroup>, %stride : i32, %b : i1) "None" {
- // CHECK: spv.CooperativeMatrixStoreNV {{%.*}}, {{%.*}}, {{%.*}} ["Volatile"] : !spv.ptr<i32, StorageBuffer>, !spv.coopmatrix<8x16xi32, Subgroup>
- spv.CooperativeMatrixStoreNV %ptr, %m, %stride, %b ["Volatile"] : !spv.ptr<i32, StorageBuffer>, !spv.coopmatrix<8x16xi32, Subgroup>
+ // CHECK: spv.NV.CooperativeMatrixStore {{%.*}}, {{%.*}}, {{%.*}} ["Volatile"] : !spv.ptr<i32, StorageBuffer>, !spv.coopmatrix<8x16xi32, Subgroup>
+ spv.NV.CooperativeMatrixStore %ptr, %m, %stride, %b ["Volatile"] : !spv.ptr<i32, StorageBuffer>, !spv.coopmatrix<8x16xi32, Subgroup>
spv.Return
}
// CHECK-LABEL: @cooperative_matrix_length
spv.func @cooperative_matrix_length() -> i32 "None" {
- // CHECK: {{%.*}} = spv.CooperativeMatrixLengthNV : !spv.coopmatrix<8x16xi32, Subgroup>
- %0 = spv.CooperativeMatrixLengthNV : !spv.coopmatrix<8x16xi32, Subgroup>
+ // CHECK: {{%.*}} = spv.NV.CooperativeMatrixLength : !spv.coopmatrix<8x16xi32, Subgroup>
+ %0 = spv.NV.CooperativeMatrixLength : !spv.coopmatrix<8x16xi32, Subgroup>
spv.ReturnValue %0 : i32
}
// CHECK-LABEL: @cooperative_matrix_muladd
spv.func @cooperative_matrix_muladd(%a : !spv.coopmatrix<8x32xi8, Subgroup>, %b : !spv.coopmatrix<32x8xi8, Subgroup>, %c : !spv.coopmatrix<8x8xi32, Subgroup>) "None" {
- // CHECK: {{%.*}} = spv.CooperativeMatrixMulAddNV {{%.*}}, {{%.*}}, {{%.*}} : !spv.coopmatrix<8x32xi8, Subgroup>, !spv.coopmatrix<32x8xi8, Subgroup> -> !spv.coopmatrix<8x8xi32, Subgroup>
- %r = spv.CooperativeMatrixMulAddNV %a, %b, %c : !spv.coopmatrix<8x32xi8, Subgroup>, !spv.coopmatrix<32x8xi8, Subgroup> -> !spv.coopmatrix<8x8xi32, Subgroup>
+ // CHECK: {{%.*}} = spv.NV.CooperativeMatrixMulAdd {{%.*}}, {{%.*}}, {{%.*}} : !spv.coopmatrix<8x32xi8, Subgroup>, !spv.coopmatrix<32x8xi8, Subgroup> -> !spv.coopmatrix<8x8xi32, Subgroup>
+ %r = spv.NV.CooperativeMatrixMulAdd %a, %b, %c : !spv.coopmatrix<8x32xi8, Subgroup>, !spv.coopmatrix<32x8xi8, Subgroup> -> !spv.coopmatrix<8x8xi32, Subgroup>
spv.Return
}
@@ -112,24 +112,24 @@ spv.func @cooperative_matrix_access_chain(%a : !spv.ptr<!spv.coopmatrix<8x16xf32
// -----
spv.func @cooperative_matrix_muladd(%a : !spv.coopmatrix<16x16xi32, Subgroup>, %b : !spv.coopmatrix<16x8xi32, Subgroup>, %c : !spv.coopmatrix<8x8xi32, Subgroup>) "None" {
- // expected-error @+1 {{'spv.CooperativeMatrixMulAddNV' op matrix size must match}}
- %r = spv.CooperativeMatrixMulAddNV %a, %b, %c : !spv.coopmatrix<16x16xi32, Subgroup>, !spv.coopmatrix<16x8xi32, Subgroup> -> !spv.coopmatrix<8x8xi32, Subgroup>
+ // expected-error @+1 {{'spv.NV.CooperativeMatrixMulAdd' op matrix size must match}}
+ %r = spv.NV.CooperativeMatrixMulAdd %a, %b, %c : !spv.coopmatrix<16x16xi32, Subgroup>, !spv.coopmatrix<16x8xi32, Subgroup> -> !spv.coopmatrix<8x8xi32, Subgroup>
spv.Return
}
// -----
spv.func @cooperative_matrix_muladd(%a : !spv.coopmatrix<8x16xi32, Subgroup>, %b : !spv.coopmatrix<8x8xi32, Subgroup>, %c : !spv.coopmatrix<8x8xi32, Subgroup>) "None" {
- // expected-error @+1 {{'spv.CooperativeMatrixMulAddNV' op matrix size must match}}
- %r = spv.CooperativeMatrixMulAddNV %a, %b, %c : !spv.coopmatrix<8x16xi32, Subgroup>, !spv.coopmatrix<8x8xi32, Subgroup> -> !spv.coopmatrix<8x8xi32, Subgroup>
+ // expected-error @+1 {{'spv.NV.CooperativeMatrixMulAdd' op matrix size must match}}
+ %r = spv.NV.CooperativeMatrixMulAdd %a, %b, %c : !spv.coopmatrix<8x16xi32, Subgroup>, !spv.coopmatrix<8x8xi32, Subgroup> -> !spv.coopmatrix<8x8xi32, Subgroup>
spv.Return
}
// -----
spv.func @cooperative_matrix_muladd(%a : !spv.coopmatrix<8x16xi32, Subgroup>, %b : !spv.coopmatrix<16x8xi32, Workgroup>, %c : !spv.coopmatrix<8x8xi32, Subgroup>) "None" {
- // expected-error @+1 {{'spv.CooperativeMatrixMulAddNV' op matrix scope must match}}
- %r = spv.CooperativeMatrixMulAddNV %a, %b, %c : !spv.coopmatrix<8x16xi32, Subgroup>, !spv.coopmatrix<16x8xi32, Workgroup> -> !spv.coopmatrix<8x8xi32, Subgroup>
+ // expected-error @+1 {{'spv.NV.CooperativeMatrixMulAdd' op matrix scope must match}}
+ %r = spv.NV.CooperativeMatrixMulAdd %a, %b, %c : !spv.coopmatrix<8x16xi32, Subgroup>, !spv.coopmatrix<16x8xi32, Workgroup> -> !spv.coopmatrix<8x8xi32, Subgroup>
spv.Return
}
@@ -137,7 +137,7 @@ spv.func @cooperative_matrix_muladd(%a : !spv.coopmatrix<8x16xi32, Subgroup>, %b
spv.func @cooperative_matrix_muladd(%a : !spv.coopmatrix<8x16xf32, Subgroup>, %b : !spv.coopmatrix<16x8xi32, Subgroup>, %c : !spv.coopmatrix<8x8xi32, Subgroup>) "None" {
// expected-error @+1 {{matrix element type must match}}
- %r = spv.CooperativeMatrixMulAddNV %a, %b, %c : !spv.coopmatrix<8x16xf32, Subgroup>, !spv.coopmatrix<16x8xi32, Subgroup> -> !spv.coopmatrix<8x8xi32, Subgroup>
+ %r = spv.NV.CooperativeMatrixMulAdd %a, %b, %c : !spv.coopmatrix<8x16xf32, Subgroup>, !spv.coopmatrix<16x8xi32, Subgroup> -> !spv.coopmatrix<8x8xi32, Subgroup>
spv.Return
}
@@ -145,7 +145,7 @@ spv.func @cooperative_matrix_muladd(%a : !spv.coopmatrix<8x16xf32, Subgroup>, %b
spv.func @cooperative_matrix_load_memaccess(%ptr : !spv.ptr<!spv.struct<(f32 [0])>, StorageBuffer>, %stride : i32, %b : i1) "None" {
// expected-error @+1 {{Pointer must point to a scalar or vector type}}
- %0 = spv.CooperativeMatrixLoadNV %ptr, %stride, %b : !spv.ptr<!spv.struct<(f32 [0])>, StorageBuffer> as !spv.coopmatrix<8x16xi32, Subgroup>
+ %0 = spv.NV.CooperativeMatrixLoad %ptr, %stride, %b : !spv.ptr<!spv.struct<(f32 [0])>, StorageBuffer> as !spv.coopmatrix<8x16xi32, Subgroup>
spv.Return
}
@@ -153,6 +153,6 @@ spv.func @cooperative_matrix_load_memaccess(%ptr : !spv.ptr<!spv.struct<(f32 [0]
spv.func @cooperative_matrix_load_memaccess(%ptr : !spv.ptr<i32, Function>, %stride : i32, %b : i1) "None" {
// expected-error @+1 {{Pointer storage class must be Workgroup, StorageBuffer or PhysicalStorageBufferEXT}}
- %0 = spv.CooperativeMatrixLoadNV %ptr, %stride, %b : !spv.ptr<i32, Function> as !spv.coopmatrix<8x16xi32, Subgroup>
+ %0 = spv.NV.CooperativeMatrixLoad %ptr, %stride, %b : !spv.ptr<i32, Function> as !spv.coopmatrix<8x16xi32, Subgroup>
spv.Return
}
diff --git a/mlir/test/Dialect/SPIRV/IR/group-ops.mlir b/mlir/test/Dialect/SPIRV/IR/group-ops.mlir
index a62f6fffa1616..809a990fed559 100644
--- a/mlir/test/Dialect/SPIRV/IR/group-ops.mlir
+++ b/mlir/test/Dialect/SPIRV/IR/group-ops.mlir
@@ -1,12 +1,12 @@
// RUN: mlir-opt -split-input-file -verify-diagnostics %s | FileCheck %s
//===----------------------------------------------------------------------===//
-// spv.SubgroupBallotKHR
+// spv.KHR.SubgroupBallot
//===----------------------------------------------------------------------===//
func.func @subgroup_ballot(%predicate: i1) -> vector<4xi32> {
- // CHECK: %{{.*}} = spv.SubgroupBallotKHR %{{.*}} : vector<4xi32>
- %0 = spv.SubgroupBallotKHR %predicate: vector<4xi32>
+ // CHECK: %{{.*}} = spv.KHR.SubgroupBallot %{{.*}} : vector<4xi32>
+ %0 = spv.KHR.SubgroupBallot %predicate: vector<4xi32>
return %0: vector<4xi32>
}
@@ -65,50 +65,50 @@ func.func @group_broadcast_negative_locid_vec4(%value: f32, %localid: vector<4xi
// -----
//===----------------------------------------------------------------------===//
-// spv.SubgroupBallotKHR
+// spv.KHR.SubgroupBallot
//===----------------------------------------------------------------------===//
func.func @subgroup_ballot(%predicate: i1) -> vector<4xi32> {
- %0 = spv.SubgroupBallotKHR %predicate: vector<4xi32>
+ %0 = spv.KHR.SubgroupBallot %predicate: vector<4xi32>
return %0: vector<4xi32>
}
// -----
//===----------------------------------------------------------------------===//
-// spv.SubgroupBlockReadINTEL
+// spv.INTEL.SubgroupBlockRead
//===----------------------------------------------------------------------===//
func.func @subgroup_block_read_intel(%ptr : !spv.ptr<i32, StorageBuffer>) -> i32 {
- // CHECK: spv.SubgroupBlockReadINTEL %{{.*}} : i32
- %0 = spv.SubgroupBlockReadINTEL "StorageBuffer" %ptr : i32
+ // CHECK: spv.INTEL.SubgroupBlockRead %{{.*}} : i32
+ %0 = spv.INTEL.SubgroupBlockRead "StorageBuffer" %ptr : i32
return %0: i32
}
// -----
func.func @subgroup_block_read_intel_vector(%ptr : !spv.ptr<i32, StorageBuffer>) -> vector<3xi32> {
- // CHECK: spv.SubgroupBlockReadINTEL %{{.*}} : vector<3xi32>
- %0 = spv.SubgroupBlockReadINTEL "StorageBuffer" %ptr : vector<3xi32>
+ // CHECK: spv.INTEL.SubgroupBlockRead %{{.*}} : vector<3xi32>
+ %0 = spv.INTEL.SubgroupBlockRead "StorageBuffer" %ptr : vector<3xi32>
return %0: vector<3xi32>
}
// -----
//===----------------------------------------------------------------------===//
-// spv.SubgroupBlockWriteINTEL
+// spv.INTEL.SubgroupBlockWrite
//===----------------------------------------------------------------------===//
func.func @subgroup_block_write_intel(%ptr : !spv.ptr<i32, StorageBuffer>, %value: i32) -> () {
- // CHECK: spv.SubgroupBlockWriteINTEL %{{.*}}, %{{.*}} : i32
- spv.SubgroupBlockWriteINTEL "StorageBuffer" %ptr, %value : i32
+ // CHECK: spv.INTEL.SubgroupBlockWrite %{{.*}}, %{{.*}} : i32
+ spv.INTEL.SubgroupBlockWrite "StorageBuffer" %ptr, %value : i32
return
}
// -----
func.func @subgroup_block_write_intel_vector(%ptr : !spv.ptr<i32, StorageBuffer>, %value: vector<3xi32>) -> () {
- // CHECK: spv.SubgroupBlockWriteINTEL %{{.*}}, %{{.*}} : vector<3xi32>
- spv.SubgroupBlockWriteINTEL "StorageBuffer" %ptr, %value : vector<3xi32>
+ // CHECK: spv.INTEL.SubgroupBlockWrite %{{.*}}, %{{.*}} : vector<3xi32>
+ spv.INTEL.SubgroupBlockWrite "StorageBuffer" %ptr, %value : vector<3xi32>
return
}
diff --git a/mlir/test/Dialect/SPIRV/IR/joint-matrix-ops.mlir b/mlir/test/Dialect/SPIRV/IR/joint-matrix-ops.mlir
index 486e2db115f96..c50dcbf8404ec 100644
--- a/mlir/test/Dialect/SPIRV/IR/joint-matrix-ops.mlir
+++ b/mlir/test/Dialect/SPIRV/IR/joint-matrix-ops.mlir
@@ -2,75 +2,75 @@
// CHECK-LABEL: @joint_matrix_load
spv.func @joint_matrix_load(%ptr : !spv.ptr<i32, Workgroup>, %stride : i32) "None" {
- // CHECK: {{%.*}} = spv.JointMatrixLoadINTEL <Subgroup> <RowMajor> {{%.*}}, {{%.*}} : (!spv.ptr<i32, Workgroup>, i32) -> !spv.jointmatrix<16x8xi32, RowMajor, Workgroup>
- %0 = spv.JointMatrixLoadINTEL <Subgroup> <RowMajor> %ptr, %stride : (!spv.ptr<i32, Workgroup>, i32) -> !spv.jointmatrix<16x8xi32, RowMajor, Workgroup>
+ // CHECK: {{%.*}} = spv.INTEL.JointMatrixLoad <Subgroup> <RowMajor> {{%.*}}, {{%.*}} : (!spv.ptr<i32, Workgroup>, i32) -> !spv.jointmatrix<16x8xi32, RowMajor, Workgroup>
+ %0 = spv.INTEL.JointMatrixLoad <Subgroup> <RowMajor> %ptr, %stride : (!spv.ptr<i32, Workgroup>, i32) -> !spv.jointmatrix<16x8xi32, RowMajor, Workgroup>
spv.Return
}
// -----
// CHECK-LABEL: @joint_matrix_load_memaccess
spv.func @joint_matrix_load_memaccess(%ptr : !spv.ptr<i32, CrossWorkgroup>, %stride : i32) "None" {
- // CHECK: {{%.*}} = spv.JointMatrixLoadINTEL <Subgroup> <RowMajor> {{%.*}}, {{%.*}} {memory_access = #spv.memory_access<Volatile>} : (!spv.ptr<i32, CrossWorkgroup>, i32) -> !spv.jointmatrix<8x16xi32, ColumnMajor, Subgroup>
- %0 = spv.JointMatrixLoadINTEL <Subgroup> <RowMajor> %ptr, %stride {memory_access = #spv.memory_access<Volatile>} : (!spv.ptr<i32, CrossWorkgroup>, i32) -> !spv.jointmatrix<8x16xi32, ColumnMajor, Subgroup>
+ // CHECK: {{%.*}} = spv.INTEL.JointMatrixLoad <Subgroup> <RowMajor> {{%.*}}, {{%.*}} {memory_access = #spv.memory_access<Volatile>} : (!spv.ptr<i32, CrossWorkgroup>, i32) -> !spv.jointmatrix<8x16xi32, ColumnMajor, Subgroup>
+ %0 = spv.INTEL.JointMatrixLoad <Subgroup> <RowMajor> %ptr, %stride {memory_access = #spv.memory_access<Volatile>} : (!spv.ptr<i32, CrossWorkgroup>, i32) -> !spv.jointmatrix<8x16xi32, ColumnMajor, Subgroup>
spv.Return
}
// CHECK-LABEL: @joint_matrix_load_
diff _ptr_type
spv.func @joint_matrix_load_
diff _ptr_type(%ptr : !spv.ptr<vector<4xi32>, Workgroup>, %stride : i32) "None" {
- // CHECK: {{%.*}} = spv.JointMatrixLoadINTEL <Subgroup> <RowMajor> {{%.*}}, {{%.*}} {memory_access = #spv.memory_access<Volatile>} : (!spv.ptr<vector<4xi32>, Workgroup>, i32) -> !spv.jointmatrix<8x16xi32, RowMajor, Workgroup>
- %0 = spv.JointMatrixLoadINTEL <Subgroup> <RowMajor> %ptr, %stride {memory_access = #spv.memory_access<Volatile>} : (!spv.ptr<vector<4xi32>, Workgroup>, i32) -> !spv.jointmatrix<8x16xi32, RowMajor, Workgroup>
+ // CHECK: {{%.*}} = spv.INTEL.JointMatrixLoad <Subgroup> <RowMajor> {{%.*}}, {{%.*}} {memory_access = #spv.memory_access<Volatile>} : (!spv.ptr<vector<4xi32>, Workgroup>, i32) -> !spv.jointmatrix<8x16xi32, RowMajor, Workgroup>
+ %0 = spv.INTEL.JointMatrixLoad <Subgroup> <RowMajor> %ptr, %stride {memory_access = #spv.memory_access<Volatile>} : (!spv.ptr<vector<4xi32>, Workgroup>, i32) -> !spv.jointmatrix<8x16xi32, RowMajor, Workgroup>
spv.Return
}
// CHECK-LABEL: @joint_matrix_store
spv.func @joint_matrix_store(%ptr : !spv.ptr<i32, Workgroup>, %stride : i32, %m : !spv.jointmatrix<8x16xi32, RowMajor, Workgroup>) "None" {
- // CHECK: spv.JointMatrixStoreINTEL <Subgroup> <RowMajor> {{%.*}}, {{%.*}}, {{%.*}} : (!spv.ptr<i32, Workgroup>, !spv.jointmatrix<8x16xi32, RowMajor, Workgroup>, i32)
- spv.JointMatrixStoreINTEL <Subgroup> <RowMajor> %ptr, %m, %stride : (!spv.ptr<i32, Workgroup>, !spv.jointmatrix<8x16xi32, RowMajor, Workgroup>, i32)
+ // CHECK: spv.INTEL.JointMatrixStore <Subgroup> <RowMajor> {{%.*}}, {{%.*}}, {{%.*}} : (!spv.ptr<i32, Workgroup>, !spv.jointmatrix<8x16xi32, RowMajor, Workgroup>, i32)
+ spv.INTEL.JointMatrixStore <Subgroup> <RowMajor> %ptr, %m, %stride : (!spv.ptr<i32, Workgroup>, !spv.jointmatrix<8x16xi32, RowMajor, Workgroup>, i32)
spv.Return
}
// CHECK-LABEL: @joint_matrix_store_memaccess
spv.func @joint_matrix_store_memaccess(%ptr : !spv.ptr<i32, Workgroup>, %m : !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>, %stride : i32) "None" {
- // CHECK: spv.JointMatrixStoreINTEL <Subgroup> <ColumnMajor> {{%.*}}, {{%.*}}, {{%.*}} {Volatile} : (!spv.ptr<i32, Workgroup>, !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>, i32)
- spv.JointMatrixStoreINTEL <Subgroup> <ColumnMajor> %ptr, %m, %stride {Volatile} : (!spv.ptr<i32, Workgroup>, !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>, i32)
+ // CHECK: spv.INTEL.JointMatrixStore <Subgroup> <ColumnMajor> {{%.*}}, {{%.*}}, {{%.*}} {Volatile} : (!spv.ptr<i32, Workgroup>, !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>, i32)
+ spv.INTEL.JointMatrixStore <Subgroup> <ColumnMajor> %ptr, %m, %stride {Volatile} : (!spv.ptr<i32, Workgroup>, !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>, i32)
spv.Return
}
// CHECK-LABEL: @joint_matrix_length
spv.func @joint_matrix_length() -> i32 "None" {
- // CHECK: {{%.*}} = spv.JointMatrixWorkItemLengthINTEL : !spv.jointmatrix<8x16xi32, PackedB, Subgroup>
- %0 = spv.JointMatrixWorkItemLengthINTEL : !spv.jointmatrix<8x16xi32, PackedB, Subgroup>
+ // CHECK: {{%.*}} = spv.INTEL.JointMatrixWorkItemLength : !spv.jointmatrix<8x16xi32, PackedB, Subgroup>
+ %0 = spv.INTEL.JointMatrixWorkItemLength : !spv.jointmatrix<8x16xi32, PackedB, Subgroup>
spv.ReturnValue %0 : i32
}
// CHECK-LABEL: @joint_matrix_muladd
spv.func @joint_matrix_muladd(%a : !spv.jointmatrix<8x32xi8, RowMajor, Subgroup>, %b : !spv.jointmatrix<32x8xi8, ColumnMajor, Subgroup>, %c : !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>) "None" {
- // CHECK: {{%.*}} = spv.JointMatrixMadINTEL <Subgroup> {{%.*}}, {{%.*}}, {{%.*}} : !spv.jointmatrix<8x32xi8, RowMajor, Subgroup>, !spv.jointmatrix<32x8xi8, ColumnMajor, Subgroup> -> !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>
- %r = spv.JointMatrixMadINTEL <Subgroup> %a, %b, %c : !spv.jointmatrix<8x32xi8, RowMajor, Subgroup>, !spv.jointmatrix<32x8xi8, ColumnMajor, Subgroup> -> !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>
+ // CHECK: {{%.*}} = spv.INTEL.JointMatrixMad <Subgroup> {{%.*}}, {{%.*}}, {{%.*}} : !spv.jointmatrix<8x32xi8, RowMajor, Subgroup>, !spv.jointmatrix<32x8xi8, ColumnMajor, Subgroup> -> !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>
+ %r = spv.INTEL.JointMatrixMad <Subgroup> %a, %b, %c : !spv.jointmatrix<8x32xi8, RowMajor, Subgroup>, !spv.jointmatrix<32x8xi8, ColumnMajor, Subgroup> -> !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>
spv.Return
}
// -----
spv.func @joint_matrix_muladd(%a : !spv.jointmatrix<16x16xi32, RowMajor, Subgroup>, %b : !spv.jointmatrix<16x8xi32, RowMajor, Subgroup>, %c : !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>) "None" {
- // expected-error @+1 {{'spv.JointMatrixMadINTEL' op matrix size must match}}
- %r = spv.JointMatrixMadINTEL <Subgroup> %a, %b, %c : !spv.jointmatrix<16x16xi32, RowMajor, Subgroup>, !spv.jointmatrix<16x8xi32, RowMajor, Subgroup> -> !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>
+ // expected-error @+1 {{'spv.INTEL.JointMatrixMad' op matrix size must match}}
+ %r = spv.INTEL.JointMatrixMad <Subgroup> %a, %b, %c : !spv.jointmatrix<16x16xi32, RowMajor, Subgroup>, !spv.jointmatrix<16x8xi32, RowMajor, Subgroup> -> !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>
spv.Return
}
// -----
spv.func @joint_matrix_muladd(%a : !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>, %b : !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>, %c : !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>) "None" {
- // expected-error @+1 {{'spv.JointMatrixMadINTEL' op matrix size must match}}
- %r = spv.JointMatrixMadINTEL <Subgroup> %a, %b, %c : !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>, !spv.jointmatrix<8x8xi32, RowMajor, Subgroup> -> !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>
+ // expected-error @+1 {{'spv.INTEL.JointMatrixMad' op matrix size must match}}
+ %r = spv.INTEL.JointMatrixMad <Subgroup> %a, %b, %c : !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>, !spv.jointmatrix<8x8xi32, RowMajor, Subgroup> -> !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>
spv.Return
}
// -----
spv.func @joint_matrix_muladd(%a : !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>, %b : !spv.jointmatrix<16x8xi32, RowMajor, Workgroup>, %c : !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>) "None" {
- // expected-error @+1 {{'spv.JointMatrixMadINTEL' op matrix scope must match}}
- %r = spv.JointMatrixMadINTEL <Subgroup> %a, %b, %c : !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>, !spv.jointmatrix<16x8xi32, RowMajor, Workgroup> -> !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>
+ // expected-error @+1 {{'spv.INTEL.JointMatrixMad' op matrix scope must match}}
+ %r = spv.INTEL.JointMatrixMad <Subgroup> %a, %b, %c : !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>, !spv.jointmatrix<16x8xi32, RowMajor, Workgroup> -> !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>
spv.Return
}
@@ -78,7 +78,7 @@ spv.func @joint_matrix_muladd(%a : !spv.jointmatrix<8x16xi32, RowMajor, Subgroup
spv.func @joint_matrix_muladd(%a : !spv.jointmatrix<8x16xf32, RowMajor, Subgroup>, %b : !spv.jointmatrix<16x8xi32, RowMajor, Subgroup>, %c : !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>) "None" {
// expected-error @+1 {{matrix element type must match}}
- %r = spv.JointMatrixMadINTEL <Subgroup> %a, %b, %c : !spv.jointmatrix<8x16xf32, RowMajor, Subgroup>, !spv.jointmatrix<16x8xi32, RowMajor, Subgroup> -> !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>
+ %r = spv.INTEL.JointMatrixMad <Subgroup> %a, %b, %c : !spv.jointmatrix<8x16xf32, RowMajor, Subgroup>, !spv.jointmatrix<16x8xi32, RowMajor, Subgroup> -> !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>
spv.Return
}
@@ -86,7 +86,7 @@ spv.func @joint_matrix_muladd(%a : !spv.jointmatrix<8x16xf32, RowMajor, Subgroup
spv.func @joint_matrix_load_memaccess(%ptr : !spv.ptr<!spv.struct<(f32 [0])>, Workgroup>, %stride : i32) "None" {
// expected-error @+1 {{Pointer must point to a scalar or vector type}}
- %0 = spv.JointMatrixLoadINTEL <Subgroup> <RowMajor> %ptr, %stride : (!spv.ptr<!spv.struct<(f32 [0])>, Workgroup>, i32)-> !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>
+ %0 = spv.INTEL.JointMatrixLoad <Subgroup> <RowMajor> %ptr, %stride : (!spv.ptr<!spv.struct<(f32 [0])>, Workgroup>, i32)-> !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>
spv.Return
}
@@ -94,6 +94,6 @@ spv.func @joint_matrix_load_memaccess(%ptr : !spv.ptr<!spv.struct<(f32 [0])>, Wo
spv.func @joint_matrix_load_memaccess(%ptr : !spv.ptr<i32, Function>, %stride : i32) "None" {
// expected-error @+1 {{Pointer storage class must be Workgroup or CrossWorkgroup}}
- %0 = spv.JointMatrixLoadINTEL <Subgroup> <RowMajor> %ptr, %stride : (!spv.ptr<i32, Function>, i32) -> !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>
+ %0 = spv.INTEL.JointMatrixLoad <Subgroup> <RowMajor> %ptr, %stride : (!spv.ptr<i32, Function>, i32) -> !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>
spv.Return
}
diff --git a/mlir/test/Dialect/SPIRV/IR/misc-ops.mlir b/mlir/test/Dialect/SPIRV/IR/misc-ops.mlir
index ff9cb6d5e602f..798410443f057 100644
--- a/mlir/test/Dialect/SPIRV/IR/misc-ops.mlir
+++ b/mlir/test/Dialect/SPIRV/IR/misc-ops.mlir
@@ -31,8 +31,8 @@ func.func @undef() -> () {
// -----
func.func @assume_true(%arg : i1) -> () {
- // CHECK: spv.AssumeTrueKHR %{{.*}}
- spv.AssumeTrueKHR %arg
+ // CHECK: spv.KHR.AssumeTrue %{{.*}}
+ spv.KHR.AssumeTrue %arg
spv.Return
}
@@ -41,6 +41,6 @@ func.func @assume_true(%arg : i1) -> () {
func.func @assume_true(%arg : f32) -> () {
// expected-error @+2{{use of value '%arg' expects
diff erent type than prior uses: 'i1' vs 'f32'}}
// expected-note @-2 {{prior use here}}
- spv.AssumeTrueKHR %arg
+ spv.KHR.AssumeTrue %arg
spv.Return
}
diff --git a/mlir/test/Dialect/SPIRV/IR/target-env.mlir b/mlir/test/Dialect/SPIRV/IR/target-env.mlir
index 8a72b76ef1340..0bb797f66dcdc 100644
--- a/mlir/test/Dialect/SPIRV/IR/target-env.mlir
+++ b/mlir/test/Dialect/SPIRV/IR/target-env.mlir
@@ -16,7 +16,7 @@
// spv.GroupNonUniformBallot is available starting from SPIR-V 1.3 under
// GroupNonUniform capability.
-// spv.SubgroupBallotKHR is available under in all SPIR-V versions under
+// spv.KHR.SubgroupBallot is available under in all SPIR-V versions under
// SubgroupBallotKHR capability and SPV_KHR_shader_ballot extension.
// The GeometryPointSize capability implies the Geometry capability, which
@@ -130,7 +130,7 @@ func.func @bit_reverse_recursively_implied_capability(%operand: i32) -> i32 attr
func.func @subgroup_ballot_suitable_extension(%predicate: i1) -> vector<4xi32> attributes {
spv.target_env = #spv.target_env<#spv.vce<v1.4, [SubgroupBallotKHR], [SPV_KHR_shader_ballot]>, #spv.resource_limits<>>
} {
- // CHECK: spv.SubgroupBallotKHR
+ // CHECK: spv.KHR.SubgroupBallot
%0 = "test.convert_to_subgroup_ballot_op"(%predicate): (i1) -> (vector<4xi32>)
return %0: vector<4xi32>
}
diff --git a/mlir/test/Dialect/SPIRV/Transforms/vce-deduction.mlir b/mlir/test/Dialect/SPIRV/Transforms/vce-deduction.mlir
index 0c00058842594..65ce7fec6eef0 100644
--- a/mlir/test/Dialect/SPIRV/Transforms/vce-deduction.mlir
+++ b/mlir/test/Dialect/SPIRV/Transforms/vce-deduction.mlir
@@ -150,7 +150,7 @@ spv.module Logical GLSL450 attributes {
//===----------------------------------------------------------------------===//
// Test deducing minimal extensions.
-// spv.SubgroupBallotKHR requires the SPV_KHR_shader_ballot extension.
+// spv.KHR.SubgroupBallot requires the SPV_KHR_shader_ballot extension.
// CHECK: requires #spv.vce<v1.0, [SubgroupBallotKHR, Shader], [SPV_KHR_shader_ballot]>
spv.module Logical GLSL450 attributes {
@@ -159,7 +159,7 @@ spv.module Logical GLSL450 attributes {
[SPV_KHR_shader_ballot, SPV_KHR_shader_clock, SPV_KHR_variable_pointers]>, #spv.resource_limits<>>
} {
spv.func @subgroup_ballot(%predicate : i1) -> vector<4xi32> "None" {
- %0 = spv.SubgroupBallotKHR %predicate: vector<4xi32>
+ %0 = spv.KHR.SubgroupBallot %predicate: vector<4xi32>
spv.ReturnValue %0: vector<4xi32>
}
}
diff --git a/mlir/test/Target/SPIRV/atomic-ops.mlir b/mlir/test/Target/SPIRV/atomic-ops.mlir
index a8706dcca4835..97a946c34afaf 100644
--- a/mlir/test/Target/SPIRV/atomic-ops.mlir
+++ b/mlir/test/Target/SPIRV/atomic-ops.mlir
@@ -36,8 +36,8 @@ spv.module Logical GLSL450 requires #spv.vce<v1.0, [Shader], []> {
// CHECK-LABEL: @test_float_atomics
spv.func @test_float_atomics(%ptr: !spv.ptr<f32, Workgroup>, %value: f32) -> f32 "None" {
- // CHECK: spv.AtomicFAddEXT "Workgroup" "Acquire" %{{.*}}, %{{.*}} : !spv.ptr<f32, Workgroup>
- %0 = spv.AtomicFAddEXT "Workgroup" "Acquire" %ptr, %value : !spv.ptr<f32, Workgroup>
+ // CHECK: spv.EXT.AtomicFAdd "Workgroup" "Acquire" %{{.*}}, %{{.*}} : !spv.ptr<f32, Workgroup>
+ %0 = spv.EXT.AtomicFAdd "Workgroup" "Acquire" %ptr, %value : !spv.ptr<f32, Workgroup>
spv.ReturnValue %0: f32
}
}
diff --git a/mlir/test/Target/SPIRV/cooperative-matrix-ops.mlir b/mlir/test/Target/SPIRV/cooperative-matrix-ops.mlir
index bf7deebad6eff..2b7169c0ff052 100644
--- a/mlir/test/Target/SPIRV/cooperative-matrix-ops.mlir
+++ b/mlir/test/Target/SPIRV/cooperative-matrix-ops.mlir
@@ -3,43 +3,43 @@
spv.module Logical GLSL450 requires #spv.vce<v1.0, [CooperativeMatrixNV], [SPV_NV_cooperative_matrix]> {
// CHECK-LABEL: @cooperative_matrix_load
spv.func @cooperative_matrix_load(%ptr : !spv.ptr<i32, StorageBuffer>, %stride : i32, %b : i1) "None" {
- // CHECK: {{%.*}} = spv.CooperativeMatrixLoadNV {{%.*}}, {{%.*}}, {{%.*}} : !spv.ptr<i32, StorageBuffer> as !spv.coopmatrix<16x8xi32, Workgroup>
- %0 = spv.CooperativeMatrixLoadNV %ptr, %stride, %b : !spv.ptr<i32, StorageBuffer> as !spv.coopmatrix<16x8xi32, Workgroup>
+ // CHECK: {{%.*}} = spv.NV.CooperativeMatrixLoad {{%.*}}, {{%.*}}, {{%.*}} : !spv.ptr<i32, StorageBuffer> as !spv.coopmatrix<16x8xi32, Workgroup>
+ %0 = spv.NV.CooperativeMatrixLoad %ptr, %stride, %b : !spv.ptr<i32, StorageBuffer> as !spv.coopmatrix<16x8xi32, Workgroup>
spv.Return
}
// CHECK-LABEL: @cooperative_matrix_load_memaccess
spv.func @cooperative_matrix_load_memaccess(%ptr : !spv.ptr<i32, StorageBuffer>, %stride : i32, %b : i1) "None" {
- // CHECK: {{%.*}} = spv.CooperativeMatrixLoadNV {{%.*}}, {{%.*}}, {{%.*}} ["Volatile"] : !spv.ptr<i32, StorageBuffer> as !spv.coopmatrix<8x16xi32, Subgroup>
- %0 = spv.CooperativeMatrixLoadNV %ptr, %stride, %b ["Volatile"] : !spv.ptr<i32, StorageBuffer> as !spv.coopmatrix<8x16xi32, Subgroup>
+ // CHECK: {{%.*}} = spv.NV.CooperativeMatrixLoad {{%.*}}, {{%.*}}, {{%.*}} ["Volatile"] : !spv.ptr<i32, StorageBuffer> as !spv.coopmatrix<8x16xi32, Subgroup>
+ %0 = spv.NV.CooperativeMatrixLoad %ptr, %stride, %b ["Volatile"] : !spv.ptr<i32, StorageBuffer> as !spv.coopmatrix<8x16xi32, Subgroup>
spv.Return
}
// CHECK-LABEL: @cooperative_matrix_store
spv.func @cooperative_matrix_store(%ptr : !spv.ptr<i32, StorageBuffer>, %stride : i32, %m : !spv.coopmatrix<16x8xi32, Workgroup>, %b : i1) "None" {
- // CHECK: spv.CooperativeMatrixStoreNV {{%.*}}, {{%.*}}, {{%.*}} : !spv.ptr<i32, StorageBuffer>, !spv.coopmatrix<16x8xi32, Workgroup>
- spv.CooperativeMatrixStoreNV %ptr, %m, %stride, %b : !spv.ptr<i32, StorageBuffer>, !spv.coopmatrix<16x8xi32, Workgroup>
+ // CHECK: spv.NV.CooperativeMatrixStore {{%.*}}, {{%.*}}, {{%.*}} : !spv.ptr<i32, StorageBuffer>, !spv.coopmatrix<16x8xi32, Workgroup>
+ spv.NV.CooperativeMatrixStore %ptr, %m, %stride, %b : !spv.ptr<i32, StorageBuffer>, !spv.coopmatrix<16x8xi32, Workgroup>
spv.Return
}
// CHECK-LABEL: @cooperative_matrix_store_memaccess
spv.func @cooperative_matrix_store_memaccess(%ptr : !spv.ptr<i32, StorageBuffer>, %m : !spv.coopmatrix<8x16xi32, Subgroup>, %stride : i32, %b : i1) "None" {
- // CHECK: spv.CooperativeMatrixStoreNV {{%.*}}, {{%.*}}, {{%.*}} ["Volatile"] : !spv.ptr<i32, StorageBuffer>, !spv.coopmatrix<8x16xi32, Subgroup>
- spv.CooperativeMatrixStoreNV %ptr, %m, %stride, %b ["Volatile"] : !spv.ptr<i32, StorageBuffer>, !spv.coopmatrix<8x16xi32, Subgroup>
+ // CHECK: spv.NV.CooperativeMatrixStore {{%.*}}, {{%.*}}, {{%.*}} ["Volatile"] : !spv.ptr<i32, StorageBuffer>, !spv.coopmatrix<8x16xi32, Subgroup>
+ spv.NV.CooperativeMatrixStore %ptr, %m, %stride, %b ["Volatile"] : !spv.ptr<i32, StorageBuffer>, !spv.coopmatrix<8x16xi32, Subgroup>
spv.Return
}
// CHECK-LABEL: @cooperative_matrix_length
spv.func @cooperative_matrix_length() -> i32 "None" {
- // CHECK: {{%.*}} = spv.CooperativeMatrixLengthNV : !spv.coopmatrix<8x16xi32, Subgroup>
- %0 = spv.CooperativeMatrixLengthNV : !spv.coopmatrix<8x16xi32, Subgroup>
+ // CHECK: {{%.*}} = spv.NV.CooperativeMatrixLength : !spv.coopmatrix<8x16xi32, Subgroup>
+ %0 = spv.NV.CooperativeMatrixLength : !spv.coopmatrix<8x16xi32, Subgroup>
spv.ReturnValue %0 : i32
}
// CHECK-LABEL: @cooperative_matrix_muladd
spv.func @cooperative_matrix_muladd(%a : !spv.coopmatrix<8x16xi32, Subgroup>, %b : !spv.coopmatrix<16x8xi32, Subgroup>, %c : !spv.coopmatrix<8x8xi32, Subgroup>) "None" {
- // CHECK: {{%.*}} = spv.CooperativeMatrixMulAddNV {{%.*}}, {{%.*}}, {{%.*}} : !spv.coopmatrix<8x16xi32, Subgroup>, !spv.coopmatrix<16x8xi32, Subgroup> -> !spv.coopmatrix<8x8xi32, Subgroup>
- %r = spv.CooperativeMatrixMulAddNV %a, %b, %c : !spv.coopmatrix<8x16xi32, Subgroup>, !spv.coopmatrix<16x8xi32, Subgroup> -> !spv.coopmatrix<8x8xi32, Subgroup>
+ // CHECK: {{%.*}} = spv.NV.CooperativeMatrixMulAdd {{%.*}}, {{%.*}}, {{%.*}} : !spv.coopmatrix<8x16xi32, Subgroup>, !spv.coopmatrix<16x8xi32, Subgroup> -> !spv.coopmatrix<8x8xi32, Subgroup>
+ %r = spv.NV.CooperativeMatrixMulAdd %a, %b, %c : !spv.coopmatrix<8x16xi32, Subgroup>, !spv.coopmatrix<16x8xi32, Subgroup> -> !spv.coopmatrix<8x8xi32, Subgroup>
spv.Return
}
diff --git a/mlir/test/Target/SPIRV/group-ops.mlir b/mlir/test/Target/SPIRV/group-ops.mlir
index 27d917b3d49ac..73db0db655f0f 100644
--- a/mlir/test/Target/SPIRV/group-ops.mlir
+++ b/mlir/test/Target/SPIRV/group-ops.mlir
@@ -3,8 +3,8 @@
spv.module Logical GLSL450 requires #spv.vce<v1.0, [Shader], []> {
// CHECK-LABEL: @subgroup_ballot
spv.func @subgroup_ballot(%predicate: i1) -> vector<4xi32> "None" {
- // CHECK: %{{.*}} = spv.SubgroupBallotKHR %{{.*}}: vector<4xi32>
- %0 = spv.SubgroupBallotKHR %predicate: vector<4xi32>
+ // CHECK: %{{.*}} = spv.KHR.SubgroupBallot %{{.*}}: vector<4xi32>
+ %0 = spv.KHR.SubgroupBallot %predicate: vector<4xi32>
spv.ReturnValue %0: vector<4xi32>
}
// CHECK-LABEL: @group_broadcast_1
@@ -21,26 +21,26 @@ spv.module Logical GLSL450 requires #spv.vce<v1.0, [Shader], []> {
}
// CHECK-LABEL: @subgroup_block_read_intel
spv.func @subgroup_block_read_intel(%ptr : !spv.ptr<i32, StorageBuffer>) -> i32 "None" {
- // CHECK: spv.SubgroupBlockReadINTEL %{{.*}} : i32
- %0 = spv.SubgroupBlockReadINTEL "StorageBuffer" %ptr : i32
+ // CHECK: spv.INTEL.SubgroupBlockRead %{{.*}} : i32
+ %0 = spv.INTEL.SubgroupBlockRead "StorageBuffer" %ptr : i32
spv.ReturnValue %0: i32
}
// CHECK-LABEL: @subgroup_block_read_intel_vector
spv.func @subgroup_block_read_intel_vector(%ptr : !spv.ptr<i32, StorageBuffer>) -> vector<3xi32> "None" {
- // CHECK: spv.SubgroupBlockReadINTEL %{{.*}} : vector<3xi32>
- %0 = spv.SubgroupBlockReadINTEL "StorageBuffer" %ptr : vector<3xi32>
+ // CHECK: spv.INTEL.SubgroupBlockRead %{{.*}} : vector<3xi32>
+ %0 = spv.INTEL.SubgroupBlockRead "StorageBuffer" %ptr : vector<3xi32>
spv.ReturnValue %0: vector<3xi32>
}
// CHECK-LABEL: @subgroup_block_write_intel
spv.func @subgroup_block_write_intel(%ptr : !spv.ptr<i32, StorageBuffer>, %value: i32) -> () "None" {
- // CHECK: spv.SubgroupBlockWriteINTEL %{{.*}}, %{{.*}} : i32
- spv.SubgroupBlockWriteINTEL "StorageBuffer" %ptr, %value : i32
+ // CHECK: spv.INTEL.SubgroupBlockWrite %{{.*}}, %{{.*}} : i32
+ spv.INTEL.SubgroupBlockWrite "StorageBuffer" %ptr, %value : i32
spv.Return
}
// CHECK-LABEL: @subgroup_block_write_intel_vector
spv.func @subgroup_block_write_intel_vector(%ptr : !spv.ptr<i32, StorageBuffer>, %value: vector<3xi32>) -> () "None" {
- // CHECK: spv.SubgroupBlockWriteINTEL %{{.*}}, %{{.*}} : vector<3xi32>
- spv.SubgroupBlockWriteINTEL "StorageBuffer" %ptr, %value : vector<3xi32>
+ // CHECK: spv.INTEL.SubgroupBlockWrite %{{.*}}, %{{.*}} : vector<3xi32>
+ spv.INTEL.SubgroupBlockWrite "StorageBuffer" %ptr, %value : vector<3xi32>
spv.Return
}
}
diff --git a/mlir/test/Target/SPIRV/joint-matrix-ops.mlir b/mlir/test/Target/SPIRV/joint-matrix-ops.mlir
index bafa12e003436..1514f98a342be 100644
--- a/mlir/test/Target/SPIRV/joint-matrix-ops.mlir
+++ b/mlir/test/Target/SPIRV/joint-matrix-ops.mlir
@@ -3,43 +3,43 @@
spv.module Logical GLSL450 requires #spv.vce<v1.0, [JointMatrixINTEL], [SPV_INTEL_joint_matrix]> {
// CHECK-LABEL: @joint_matrix_load
spv.func @joint_matrix_load(%ptr : !spv.ptr<i32, Workgroup>, %stride : i32) "None" {
- // CHECK: {{%.*}} = spv.JointMatrixLoadINTEL <Subgroup> <RowMajor> {{%.*}}, {{%.*}} : (!spv.ptr<i32, Workgroup>, i32) -> !spv.jointmatrix<16x8xi32, RowMajor, Workgroup>
- %0 = spv.JointMatrixLoadINTEL <Subgroup> <RowMajor> %ptr, %stride : (!spv.ptr<i32, Workgroup>, i32) -> !spv.jointmatrix<16x8xi32, RowMajor, Workgroup>
+ // CHECK: {{%.*}} = spv.INTEL.JointMatrixLoad <Subgroup> <RowMajor> {{%.*}}, {{%.*}} : (!spv.ptr<i32, Workgroup>, i32) -> !spv.jointmatrix<16x8xi32, RowMajor, Workgroup>
+ %0 = spv.INTEL.JointMatrixLoad <Subgroup> <RowMajor> %ptr, %stride : (!spv.ptr<i32, Workgroup>, i32) -> !spv.jointmatrix<16x8xi32, RowMajor, Workgroup>
spv.Return
}
// CHECK-LABEL: @joint_matrix_load_memaccess
spv.func @joint_matrix_load_memaccess(%ptr : !spv.ptr<i32, Workgroup>, %stride : i32) "None" {
- // CHECK: {{%.*}} = spv.JointMatrixLoadINTEL <Subgroup> <RowMajor> {{%.*}}, {{%.*}} {memory_access = #spv.memory_access<Volatile>} : (!spv.ptr<i32, Workgroup>, i32) -> !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>
- %0 = spv.JointMatrixLoadINTEL <Subgroup> <RowMajor> %ptr, %stride {memory_access = #spv.memory_access<Volatile>} : (!spv.ptr<i32, Workgroup>, i32) -> !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>
+ // CHECK: {{%.*}} = spv.INTEL.JointMatrixLoad <Subgroup> <RowMajor> {{%.*}}, {{%.*}} {memory_access = #spv.memory_access<Volatile>} : (!spv.ptr<i32, Workgroup>, i32) -> !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>
+ %0 = spv.INTEL.JointMatrixLoad <Subgroup> <RowMajor> %ptr, %stride {memory_access = #spv.memory_access<Volatile>} : (!spv.ptr<i32, Workgroup>, i32) -> !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>
spv.Return
}
// CHECK-LABEL: @joint_matrix_store
spv.func @joint_matrix_store(%ptr : !spv.ptr<i32, Workgroup>, %stride : i32, %m : !spv.jointmatrix<16x8xi32, RowMajor, Workgroup>) "None" {
- // CHECK: spv.JointMatrixStoreINTEL <Subgroup> <RowMajor> {{%.*}}, {{%.*}}, {{%.*}} : (!spv.ptr<i32, Workgroup>, !spv.jointmatrix<16x8xi32, RowMajor, Workgroup>, i32)
- spv.JointMatrixStoreINTEL <Subgroup> <RowMajor> %ptr, %m, %stride : (!spv.ptr<i32, Workgroup>, !spv.jointmatrix<16x8xi32, RowMajor, Workgroup>, i32)
+ // CHECK: spv.INTEL.JointMatrixStore <Subgroup> <RowMajor> {{%.*}}, {{%.*}}, {{%.*}} : (!spv.ptr<i32, Workgroup>, !spv.jointmatrix<16x8xi32, RowMajor, Workgroup>, i32)
+ spv.INTEL.JointMatrixStore <Subgroup> <RowMajor> %ptr, %m, %stride : (!spv.ptr<i32, Workgroup>, !spv.jointmatrix<16x8xi32, RowMajor, Workgroup>, i32)
spv.Return
}
// CHECK-LABEL: @joint_matrix_store_memaccess
spv.func @joint_matrix_store_memaccess(%ptr : !spv.ptr<i32, Workgroup>, %m : !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>, %stride : i32) "None" {
- // CHECK: spv.JointMatrixStoreINTEL <Subgroup> <RowMajor> {{%.*}}, {{%.*}}, {{%.*}} {memory_access = #spv.memory_access<Volatile>} : (!spv.ptr<i32, Workgroup>, !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>, i32)
- spv.JointMatrixStoreINTEL <Subgroup> <RowMajor> %ptr, %m, %stride {memory_access = #spv.memory_access<Volatile>} : (!spv.ptr<i32, Workgroup>, !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>, i32)
+ // CHECK: spv.INTEL.JointMatrixStore <Subgroup> <RowMajor> {{%.*}}, {{%.*}}, {{%.*}} {memory_access = #spv.memory_access<Volatile>} : (!spv.ptr<i32, Workgroup>, !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>, i32)
+ spv.INTEL.JointMatrixStore <Subgroup> <RowMajor> %ptr, %m, %stride {memory_access = #spv.memory_access<Volatile>} : (!spv.ptr<i32, Workgroup>, !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>, i32)
spv.Return
}
// CHECK-LABEL: @joint_matrix_length
spv.func @joint_matrix_length() -> i32 "None" {
- // CHECK: {{%.*}} = spv.JointMatrixWorkItemLengthINTEL : !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>
- %0 = spv.JointMatrixWorkItemLengthINTEL : !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>
+ // CHECK: {{%.*}} = spv.INTEL.JointMatrixWorkItemLength : !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>
+ %0 = spv.INTEL.JointMatrixWorkItemLength : !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>
spv.ReturnValue %0 : i32
}
// CHECK-LABEL: @joint_matrix_muladd
spv.func @joint_matrix_muladd(%a : !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>, %b : !spv.jointmatrix<16x8xi32, RowMajor, Subgroup>, %c : !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>) "None" {
- // CHECK: {{%.*}} = spv.JointMatrixMadINTEL <Subgroup> {{%.*}}, {{%.*}}, {{%.*}} : !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>, !spv.jointmatrix<16x8xi32, RowMajor, Subgroup> -> !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>
- %r = spv.JointMatrixMadINTEL <Subgroup> %a, %b, %c : !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>, !spv.jointmatrix<16x8xi32, RowMajor, Subgroup> -> !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>
+ // CHECK: {{%.*}} = spv.INTEL.JointMatrixMad <Subgroup> {{%.*}}, {{%.*}}, {{%.*}} : !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>, !spv.jointmatrix<16x8xi32, RowMajor, Subgroup> -> !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>
+ %r = spv.INTEL.JointMatrixMad <Subgroup> %a, %b, %c : !spv.jointmatrix<8x16xi32, RowMajor, Subgroup>, !spv.jointmatrix<16x8xi32, RowMajor, Subgroup> -> !spv.jointmatrix<8x8xi32, RowMajor, Subgroup>
spv.Return
}
}
diff --git a/mlir/test/lib/Dialect/SPIRV/TestAvailability.cpp b/mlir/test/lib/Dialect/SPIRV/TestAvailability.cpp
index b835fda37dfd4..31adb07599b6e 100644
--- a/mlir/test/lib/Dialect/SPIRV/TestAvailability.cpp
+++ b/mlir/test/lib/Dialect/SPIRV/TestAvailability.cpp
@@ -233,7 +233,7 @@ ConvertToModule::matchAndRewrite(Operation *op,
ConvertToSubgroupBallot::ConvertToSubgroupBallot(MLIRContext *context)
: RewritePattern("test.convert_to_subgroup_ballot_op", 1, context,
- {"spv.SubgroupBallotKHR"}) {}
+ {"spv.KHR.SubgroupBallot"}) {}
LogicalResult
ConvertToSubgroupBallot::matchAndRewrite(Operation *op,
More information about the Mlir-commits
mailing list