Skip to content

Commit ab2c104

Browse files
authored
[mlir][spirv] Suffix NV cooperative matrix props with _nv (#66820)
This is in preparation for adding a KHR variant which does not share the same parameters and needs a separate attribute.
1 parent 0677d7c commit ab2c104

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

mlir/include/mlir/Dialect/SPIRV/IR/SPIRVAttributes.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def SPIRV_LinkageAttributesAttr : SPIRV_Attr<"LinkageAttributes", "linkage_attri
5858
// target. Represents `VkCooperativeMatrixPropertiesNV`. See
5959
// https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkCooperativeMatrixPropertiesNV.html
6060
def SPIRV_CooperativeMatrixPropertiesNVAttr :
61-
SPIRV_Attr<"CooperativeMatrixPropertiesNV", "coop_matrix_props"> {
61+
SPIRV_Attr<"CooperativeMatrixPropertiesNV", "coop_matrix_props_nv"> {
6262
let parameters = (ins
6363
"int":$m_size,
6464
"int":$n_size,

mlir/test/Dialect/SPIRV/IR/target-and-abi.mlir

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,22 +208,22 @@ func.func @target_env_extra_fields() attributes {
208208

209209
// -----
210210

211-
func.func @target_env_cooperative_matrix() attributes{
211+
func.func @target_env_cooperative_matrix_nv() attributes{
212212
// CHECK: spirv.target_env = #spirv.target_env<
213213
// CHECK-SAME: SPV_NV_cooperative_matrix
214-
// CHECK-SAME: #spirv.coop_matrix_props<
214+
// CHECK-SAME: #spirv.coop_matrix_props_nv<
215215
// CHECK-SAME: m_size = 8, n_size = 8, k_size = 32,
216216
// CHECK-SAME: a_type = i8, b_type = i8, c_type = i32,
217217
// CHECK-SAME: result_type = i32, scope = <Subgroup>>
218-
// CHECK-SAME: #spirv.coop_matrix_props<
218+
// CHECK-SAME: #spirv.coop_matrix_props_nv<
219219
// CHECK-SAME: m_size = 8, n_size = 8, k_size = 16,
220220
// CHECK-SAME: a_type = f16, b_type = f16, c_type = f16,
221221
// CHECK-SAME: result_type = f16, scope = <Subgroup>>
222222
spirv.target_env = #spirv.target_env<
223223
#spirv.vce<v1.0, [Shader], [SPV_KHR_storage_buffer_storage_class,
224224
SPV_NV_cooperative_matrix]>,
225225
#spirv.resource_limits<
226-
cooperative_matrix_properties_nv = [#spirv.coop_matrix_props<
226+
cooperative_matrix_properties_nv = [#spirv.coop_matrix_props_nv<
227227
m_size = 8,
228228
n_size = 8,
229229
k_size = 32,
@@ -232,7 +232,7 @@ func.func @target_env_cooperative_matrix() attributes{
232232
c_type = i32,
233233
result_type = i32,
234234
scope = #spirv.scope<Subgroup>
235-
>, #spirv.coop_matrix_props<
235+
>, #spirv.coop_matrix_props_nv<
236236
m_size = 8,
237237
n_size = 8,
238238
k_size = 16,

0 commit comments

Comments
 (0)