Skip to content

Commit

Permalink
[mlir][spirv] Upgrade spirv group op syntax in tests
Browse files Browse the repository at this point in the history
Fixing forward a missed test from
llvm#115662.
  • Loading branch information
kuhar committed Nov 13, 2024
1 parent 39a8046 commit bf51a9e
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions mlir/test/Conversion/SPIRVToLLVM/non-uniform-ops-to-llvm.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
// CHECK: llvm.return %[[VAL_3]] : i32
// CHECK: }
spirv.func @non_uniform_iadd(%arg0: i32) -> i32 "None" {
%0 = spirv.GroupNonUniformIAdd "Subgroup" "Reduce" %arg0 : i32
%0 = spirv.GroupNonUniformIAdd <Subgroup> <Reduce> %arg0 : i32 -> i32
spirv.ReturnValue %0 : i32
}

Expand All @@ -43,7 +43,7 @@ spirv.func @non_uniform_iadd(%arg0: i32) -> i32 "None" {
// CHECK: }
spirv.func @non_uniform_fadd(%arg0: f32) -> f32 "None" {
%0 = spirv.Constant 16 : i32
%1 = spirv.GroupNonUniformFAdd "Subgroup" "ClusteredReduce" %arg0 cluster_size(%0) : f32
%1 = spirv.GroupNonUniformFAdd <Subgroup> <ClusteredReduce> %arg0 cluster_size(%0) : f32, i32 -> f32
spirv.ReturnValue %1 : f32
}

Expand All @@ -57,7 +57,7 @@ spirv.func @non_uniform_fadd(%arg0: f32) -> f32 "None" {
// CHECK: }
spirv.func @non_uniform_imul(%arg0: i32) -> i32 "None" {
%0 = spirv.Constant 16 : i32
%1 = spirv.GroupNonUniformIMul "Subgroup" "ClusteredReduce" %arg0 cluster_size(%0) : i32
%1 = spirv.GroupNonUniformIMul <Subgroup> <ClusteredReduce> %arg0 cluster_size(%0) : i32, i32 -> i32
spirv.ReturnValue %1 : i32
}

Expand All @@ -69,7 +69,7 @@ spirv.func @non_uniform_imul(%arg0: i32) -> i32 "None" {
// CHECK: llvm.return %[[VAL_3]] : f32
// CHECK: }
spirv.func @non_uniform_fmul(%arg0: f32) -> f32 "None" {
%0 = spirv.GroupNonUniformFMul "Subgroup" "Reduce" %arg0 : f32
%0 = spirv.GroupNonUniformFMul <Subgroup> <Reduce> %arg0 : f32 -> f32
spirv.ReturnValue %0 : f32
}

Expand All @@ -81,7 +81,7 @@ spirv.func @non_uniform_fmul(%arg0: f32) -> f32 "None" {
// CHECK: llvm.return %[[VAL_3]] : i32
// CHECK: }
spirv.func @non_uniform_smin(%arg0: i32) -> i32 "None" {
%0 = spirv.GroupNonUniformSMin "Subgroup" "Reduce" %arg0 : i32
%0 = spirv.GroupNonUniformSMin <Subgroup> <Reduce> %arg0 : i32 -> i32
spirv.ReturnValue %0 : i32
}

Expand All @@ -93,7 +93,7 @@ spirv.func @non_uniform_smin(%arg0: i32) -> i32 "None" {
// CHECK: llvm.return %[[VAL_3]] : i32
// CHECK: }
spirv.func @non_uniform_umin(%arg0: i32) -> i32 "None" {
%0 = spirv.GroupNonUniformUMin "Subgroup" "Reduce" %arg0 : i32
%0 = spirv.GroupNonUniformUMin <Subgroup> <Reduce> %arg0 : i32 -> i32
spirv.ReturnValue %0 : i32
}

Expand All @@ -105,7 +105,7 @@ spirv.func @non_uniform_umin(%arg0: i32) -> i32 "None" {
// CHECK: llvm.return %[[VAL_3]] : f32
// CHECK: }
spirv.func @non_uniform_fmin(%arg0: f32) -> f32 "None" {
%0 = spirv.GroupNonUniformFMin "Subgroup" "Reduce" %arg0 : f32
%0 = spirv.GroupNonUniformFMin <Subgroup> <Reduce> %arg0 : f32 -> f32
spirv.ReturnValue %0 : f32
}

Expand All @@ -119,7 +119,7 @@ spirv.func @non_uniform_fmin(%arg0: f32) -> f32 "None" {
// CHECK: }
spirv.func @non_uniform_fmin_cluster(%arg0: f32) -> f32 "None" {
%0 = spirv.Constant 16 : i32
%1 = spirv.GroupNonUniformFMin "Subgroup" "ClusteredReduce" %arg0 cluster_size(%0) : f32
%1 = spirv.GroupNonUniformFMin <Subgroup> <ClusteredReduce> %arg0 cluster_size(%0) : f32, i32 -> f32
spirv.ReturnValue %1 : f32
}

Expand All @@ -131,7 +131,7 @@ spirv.func @non_uniform_fmin_cluster(%arg0: f32) -> f32 "None" {
// CHECK: llvm.return %[[VAL_3]] : i32
// CHECK: }
spirv.func @non_uniform_smax(%arg0: i32) -> i32 "None" {
%0 = spirv.GroupNonUniformSMax "Subgroup" "Reduce" %arg0 : i32
%0 = spirv.GroupNonUniformSMax <Subgroup> <Reduce> %arg0 : i32 -> i32
spirv.ReturnValue %0 : i32
}

Expand All @@ -143,7 +143,7 @@ spirv.func @non_uniform_smax(%arg0: i32) -> i32 "None" {
// CHECK: llvm.return %[[VAL_3]] : i32
// CHECK: }
spirv.func @non_uniform_umax(%arg0: i32) -> i32 "None" {
%0 = spirv.GroupNonUniformUMax "Subgroup" "Reduce" %arg0 : i32
%0 = spirv.GroupNonUniformUMax <Subgroup> <Reduce> %arg0 : i32 -> i32
spirv.ReturnValue %0 : i32
}

Expand All @@ -155,7 +155,7 @@ spirv.func @non_uniform_umax(%arg0: i32) -> i32 "None" {
// CHECK: llvm.return %[[VAL_3]] : f32
// CHECK: }
spirv.func @non_uniform_fmax(%arg0: f32) -> f32 "None" {
%0 = spirv.GroupNonUniformFMax "Subgroup" "Reduce" %arg0 : f32
%0 = spirv.GroupNonUniformFMax <Subgroup> <Reduce> %arg0 : f32 -> f32
spirv.ReturnValue %0 : f32
}

Expand All @@ -169,7 +169,7 @@ spirv.func @non_uniform_fmax(%arg0: f32) -> f32 "None" {
// CHECK: }
spirv.func @non_uniform_smax_cluster(%arg0: i32) -> i32 "None" {
%0 = spirv.Constant 16 : i32
%1 = spirv.GroupNonUniformSMax "Subgroup" "ClusteredReduce" %arg0 cluster_size(%0) : i32
%1 = spirv.GroupNonUniformSMax <Subgroup> <ClusteredReduce> %arg0 cluster_size(%0) : i32, i32 -> i32
spirv.ReturnValue %1 : i32
}

Expand All @@ -181,7 +181,7 @@ spirv.func @non_uniform_smax_cluster(%arg0: i32) -> i32 "None" {
// CHECK: llvm.return %[[VAL_3]] : i32
// CHECK: }
spirv.func @non_uniform_bitwise_and(%arg0: i32) -> i32 "None" {
%0 = spirv.GroupNonUniformBitwiseAnd "Subgroup" "Reduce" %arg0 : i32
%0 = spirv.GroupNonUniformBitwiseAnd <Subgroup> <Reduce> %arg0 : i32 -> i32
spirv.ReturnValue %0 : i32
}

Expand All @@ -193,7 +193,7 @@ spirv.func @non_uniform_bitwise_and(%arg0: i32) -> i32 "None" {
// CHECK: llvm.return %[[VAL_3]] : i32
// CHECK: }
spirv.func @non_uniform_bitwise_or(%arg0: i32) -> i32 "None" {
%0 = spirv.GroupNonUniformBitwiseOr "Subgroup" "Reduce" %arg0 : i32
%0 = spirv.GroupNonUniformBitwiseOr <Subgroup> <Reduce> %arg0 : i32 -> i32
spirv.ReturnValue %0 : i32
}

Expand All @@ -205,7 +205,7 @@ spirv.func @non_uniform_bitwise_or(%arg0: i32) -> i32 "None" {
// CHECK: llvm.return %[[VAL_3]] : i32
// CHECK: }
spirv.func @non_uniform_bitwise_xor(%arg0: i32) -> i32 "None" {
%0 = spirv.GroupNonUniformBitwiseXor "Subgroup" "Reduce" %arg0 : i32
%0 = spirv.GroupNonUniformBitwiseXor <Subgroup> <Reduce> %arg0 : i32 -> i32
spirv.ReturnValue %0 : i32
}

Expand All @@ -217,7 +217,7 @@ spirv.func @non_uniform_bitwise_xor(%arg0: i32) -> i32 "None" {
// CHECK: llvm.return %[[VAL_3]] : i1
// CHECK: }
spirv.func @non_uniform_logical_and(%arg0: i1) -> i1 "None" {
%0 = spirv.GroupNonUniformLogicalAnd "Subgroup" "Reduce" %arg0 : i1
%0 = spirv.GroupNonUniformLogicalAnd <Subgroup> <Reduce> %arg0 : i1 -> i1
spirv.ReturnValue %0 : i1
}

Expand All @@ -229,7 +229,7 @@ spirv.func @non_uniform_logical_and(%arg0: i1) -> i1 "None" {
// CHECK: llvm.return %[[VAL_3]] : i1
// CHECK: }
spirv.func @non_uniform_logical_or(%arg0: i1) -> i1 "None" {
%0 = spirv.GroupNonUniformLogicalOr "Subgroup" "Reduce" %arg0 : i1
%0 = spirv.GroupNonUniformLogicalOr <Subgroup> <Reduce> %arg0 : i1 -> i1
spirv.ReturnValue %0 : i1
}

Expand All @@ -241,7 +241,6 @@ spirv.func @non_uniform_logical_or(%arg0: i1) -> i1 "None" {
// CHECK: llvm.return %[[VAL_3]] : i1
// CHECK: }
spirv.func @non_uniform_logical_xor(%arg0: i1) -> i1 "None" {
%0 = spirv.GroupNonUniformLogicalXor "Subgroup" "Reduce" %arg0 : i1
%0 = spirv.GroupNonUniformLogicalXor <Subgroup> <Reduce> %arg0 : i1 -> i1
spirv.ReturnValue %0 : i1
}

0 comments on commit bf51a9e

Please sign in to comment.