[Mlir-commits] [mlir] [mlir][spirv] Drop support for SPV_INTEL_joint_matrix (PR #102332)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Aug 7 09:51:57 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-spirv
Author: Andrea Faulds (andfau-amd)
<details>
<summary>Changes</summary>
This was a "preview" extension, never formalized, that has now been supplanted by SPV_KHR_cooperative_matrix.
---
Patch is 49.60 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/102332.diff
17 Files Affected:
- (modified) mlir/include/mlir/Dialect/SPIRV/IR/SPIRVAttributes.td (-21)
- (modified) mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td (+4-31)
- (removed) mlir/include/mlir/Dialect/SPIRV/IR/SPIRVJointMatrixOps.td (-243)
- (modified) mlir/include/mlir/Dialect/SPIRV/IR/SPIRVOps.td (-1)
- (modified) mlir/include/mlir/Dialect/SPIRV/IR/SPIRVTypes.h (-30)
- (modified) mlir/lib/Dialect/SPIRV/IR/CMakeLists.txt (-1)
- (modified) mlir/lib/Dialect/SPIRV/IR/CastOps.cpp (+1-2)
- (removed) mlir/lib/Dialect/SPIRV/IR/JointMatrixOps.cpp (-84)
- (modified) mlir/lib/Dialect/SPIRV/IR/SPIRVDialect.cpp (+3-47)
- (modified) mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp (+1-3)
- (modified) mlir/lib/Dialect/SPIRV/IR/SPIRVTypes.cpp (+10-86)
- (modified) mlir/lib/Target/SPIRV/Deserialization/DeserializeOps.cpp (-2)
- (modified) mlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp (-36)
- (modified) mlir/lib/Target/SPIRV/Deserialization/Deserializer.h (-2)
- (modified) mlir/lib/Target/SPIRV/Serialization/Serializer.cpp (-19)
- (removed) mlir/test/Dialect/SPIRV/IR/joint-matrix-ops.mlir (-99)
- (removed) mlir/test/Target/SPIRV/joint-matrix-ops.mlir (-45)
``````````diff
diff --git a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVAttributes.td b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVAttributes.td
index 3a11284da05122..f2a12f68d481b8 100644
--- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVAttributes.td
+++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVAttributes.td
@@ -101,27 +101,6 @@ def SPIRV_CooperativeMatrixPropertiesNVArrayAttr :
TypedArrayAttrBase<SPIRV_CooperativeMatrixPropertiesNVAttr,
"CooperativeMatrixPropertiesNV array attribute">;
-// Description of the supported joint matrix operations. See
-// https://github.com/intel/llvm/blob/sycl/sycl/doc/design/spirv-extensions/SPV_INTEL_joint_matrix.asciidoc
-def SPIRV_JointMatrixPropertiesINTELAttr :
- SPIRV_Attr<"JointMatrixPropertiesINTEL", "joint_matrix_props"> {
- let parameters = (ins
- "int":$m_size,
- "int":$n_size,
- "int":$k_size,
- "mlir::Type":$a_type,
- "mlir::Type":$b_type,
- "mlir::Type":$c_type,
- "mlir::Type":$result_type,
- "mlir::spirv::ScopeAttr":$scope
- );
- let assemblyFormat = "`<` struct(params) `>`";
-}
-
-def SPIRV_JointMatrixPropertiesINTELArrayAttr :
- TypedArrayAttrBase<SPIRV_JointMatrixPropertiesINTELAttr,
- "JointMatrixPropertiesINTEL array attribute">;
-
// This attribute specifies the limits for various resources on the target
// architecture.
//
diff --git a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
index b38978272c5bdc..af0b2624feb327 100644
--- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
+++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
@@ -399,7 +399,6 @@ def SPV_INTEL_debug_module : I32EnumAttrCase<"SPV_INTEL_de
def SPV_INTEL_fp_fast_math_mode : I32EnumAttrCase<"SPV_INTEL_fp_fast_math_mode", 4027>;
def SPV_INTEL_memory_access_aliasing : I32EnumAttrCase<"SPV_INTEL_memory_access_aliasing", 4028>;
def SPV_INTEL_split_barrier : I32EnumAttrCase<"SPV_INTEL_split_barrier", 4029>;
-def SPV_INTEL_joint_matrix : I32EnumAttrCase<"SPV_INTEL_joint_matrix", 4030>;
def SPV_INTEL_bfloat16_conversion : I32EnumAttrCase<"SPV_INTEL_bfloat16_conversion", 4031>;
def SPV_NV_compute_shader_derivatives : I32EnumAttrCase<"SPV_NV_compute_shader_derivatives", 5000>;
@@ -459,7 +458,7 @@ def SPIRV_ExtensionAttr :
SPV_INTEL_usm_storage_classes, SPV_INTEL_io_pipes, SPV_INTEL_blocking_pipes,
SPV_INTEL_fpga_reg, SPV_INTEL_long_constant_composite, SPV_INTEL_optnone,
SPV_INTEL_debug_module, SPV_INTEL_fp_fast_math_mode,
- SPV_INTEL_memory_access_aliasing, SPV_INTEL_split_barrier, SPV_INTEL_joint_matrix,
+ SPV_INTEL_memory_access_aliasing, SPV_INTEL_split_barrier,
SPV_INTEL_bfloat16_conversion, SPV_NV_compute_shader_derivatives, SPV_NV_cooperative_matrix,
SPV_NV_fragment_shader_barycentric, SPV_NV_geometry_shader_passthrough,
SPV_NV_mesh_shader, SPV_NV_ray_tracing, SPV_NV_sample_mask_override_coverage,
@@ -1410,12 +1409,6 @@ def SPIRV_C_ShaderStereoViewNV : I32EnumAttrCase<"Shade
];
}
-def SPIRV_C_JointMatrixINTEL : I32EnumAttrCase<"JointMatrixINTEL", 6118> {
- list<Availability> availability = [
- Extension<[SPV_INTEL_joint_matrix]>
- ];
-}
-
def SPIRV_C_Bfloat16ConversionINTEL : I32EnumAttrCase<"Bfloat16ConversionINTEL", 6115> {
list<Availability> availability = [
Extension<[SPV_INTEL_bfloat16_conversion]>
@@ -1514,7 +1507,7 @@ def SPIRV_CapabilityAttr :
SPIRV_C_UniformTexelBufferArrayNonUniformIndexing,
SPIRV_C_StorageTexelBufferArrayNonUniformIndexing,
SPIRV_C_ShaderViewportIndexLayerEXT, SPIRV_C_ShaderViewportMaskNV,
- SPIRV_C_ShaderStereoViewNV, SPIRV_C_JointMatrixINTEL, SPIRV_C_Bfloat16ConversionINTEL
+ SPIRV_C_ShaderStereoViewNV, SPIRV_C_Bfloat16ConversionINTEL
]>;
def SPIRV_AM_Logical : I32EnumAttrCase<"Logical", 0>;
@@ -4131,8 +4124,6 @@ def SPIRV_IsArrayType : CPred<"::llvm::isa<::mlir::spirv::ArrayType>($_self)">;
def SPIRV_IsCooperativeMatrixType :
CPred<"::llvm::isa<::mlir::spirv::CooperativeMatrixType>($_self)">;
def SPIRV_IsImageType : CPred<"::llvm::isa<::mlir::spirv::ImageType>($_self)">;
-def SPIRV_IsJointMatrixType :
- CPred<"::llvm::isa<::mlir::spirv::JointMatrixINTELType>($_self)">;
def SPIRV_IsMatrixType : CPred<"::llvm::isa<::mlir::spirv::MatrixType>($_self)">;
def SPIRV_IsPtrType : CPred<"::llvm::isa<::mlir::spirv::PointerType>($_self)">;
def SPIRV_IsRTArrayType : CPred<"::llvm::isa<::mlir::spirv::RuntimeArrayType>($_self)">;
@@ -4164,8 +4155,6 @@ def SPIRV_AnyCooperativeMatrix : DialectType<SPIRV_Dialect,
"any SPIR-V cooperative matrix type">;
def SPIRV_AnyImage : DialectType<SPIRV_Dialect, SPIRV_IsImageType,
"any SPIR-V image type">;
-def SPIRV_AnyJointMatrix : DialectType<SPIRV_Dialect, SPIRV_IsJointMatrixType,
- "any SPIR-V joint matrix type">;
def SPIRV_AnyMatrix : DialectType<SPIRV_Dialect, SPIRV_IsMatrixType,
"any SPIR-V matrix type">;
def SPIRV_AnyRTArray : DialectType<SPIRV_Dialect, SPIRV_IsRTArrayType,
@@ -4180,12 +4169,11 @@ def SPIRV_Scalar : AnyTypeOf<[SPIRV_Numerical, SPIRV_Bool]>;
def SPIRV_Aggregate : AnyTypeOf<[SPIRV_AnyArray, SPIRV_AnyRTArray, SPIRV_AnyStruct]>;
def SPIRV_Composite :
AnyTypeOf<[SPIRV_Vector, SPIRV_AnyArray, SPIRV_AnyRTArray, SPIRV_AnyStruct,
- SPIRV_AnyCooperativeMatrix, SPIRV_AnyJointMatrix, SPIRV_AnyMatrix]>;
+ SPIRV_AnyCooperativeMatrix, SPIRV_AnyMatrix]>;
def SPIRV_Type : AnyTypeOf<[
SPIRV_Void, SPIRV_Bool, SPIRV_Integer, SPIRV_Float, SPIRV_Vector,
SPIRV_AnyPtr, SPIRV_AnyArray, SPIRV_AnyRTArray, SPIRV_AnyStruct,
- SPIRV_AnyCooperativeMatrix, SPIRV_AnyJointMatrix, SPIRV_AnyMatrix,
- SPIRV_AnySampledImage
+ SPIRV_AnyCooperativeMatrix, SPIRV_AnyMatrix, SPIRV_AnySampledImage
]>;
def SPIRV_SignedInt : SignedIntOfWidths<[8, 16, 32, 64]>;
@@ -4196,11 +4184,6 @@ class SPIRV_CoopMatrixOfType<list<Type> allowedTypes> :
"::llvm::cast<::mlir::spirv::CooperativeMatrixType>($_self).getElementType()",
"Cooperative Matrix">;
-class SPIRV_JointMatrixOfType<list<Type> allowedTypes> :
- ContainerType<AnyTypeOf<allowedTypes>, SPIRV_IsJointMatrixType,
- "::llvm::cast<::mlir::spirv::JointMatrixINTELType>($_self).getElementType()",
- "Joint Matrix">;
-
class SPIRV_VectorOf<Type type> :
VectorOfLengthAndType<[2, 3, 4, 8,16], [type]>;
@@ -4482,12 +4465,6 @@ def SPIRV_OC_OpAtomicFAddEXT : I32EnumAttrCase<"OpAtomicFAddEXT", 6
def SPIRV_OC_OpGroupIMulKHR : I32EnumAttrCase<"OpGroupIMulKHR", 6401>;
def SPIRV_OC_OpGroupFMulKHR : I32EnumAttrCase<"OpGroupFMulKHR", 6402>;
-def SPIRV_OC_OpTypeJointMatrixINTEL : I32EnumAttrCase<"OpTypeJointMatrixINTEL", 6119>;
-def SPIRV_OC_OpJointMatrixLoadINTEL : I32EnumAttrCase<"OpJointMatrixLoadINTEL", 6120>;
-def SPIRV_OC_OpJointMatrixStoreINTEL : I32EnumAttrCase<"OpJointMatrixStoreINTEL", 6121>;
-def SPIRV_OC_OpJointMatrixMadINTEL : I32EnumAttrCase<"OpJointMatrixMadINTEL", 6122>;
-def SPIRV_OC_OpTypejointMatrixWorkItemLengthINTEL : I32EnumAttrCase<"OpJointMatrixWorkItemLengthINTEL", 6410>;
-
def SPIRV_OC_OpConvertFToBF16INTEL : I32EnumAttrCase<"OpConvertFToBF16INTEL", 6116>;
def SPIRV_OC_OpConvertBF16ToFINTEL : I32EnumAttrCase<"OpConvertBF16ToFINTEL", 6117>;
@@ -4579,10 +4556,6 @@ def SPIRV_OpcodeAttr :
SPIRV_OC_OpAssumeTrueKHR, SPIRV_OC_OpAtomicFAddEXT, SPIRV_OC_OpGroupIMulKHR,
SPIRV_OC_OpGroupFMulKHR,
- SPIRV_OC_OpTypeJointMatrixINTEL, SPIRV_OC_OpJointMatrixLoadINTEL,
- SPIRV_OC_OpJointMatrixStoreINTEL, SPIRV_OC_OpJointMatrixMadINTEL,
- SPIRV_OC_OpTypejointMatrixWorkItemLengthINTEL,
-
SPIRV_OC_OpConvertFToBF16INTEL, SPIRV_OC_OpConvertBF16ToFINTEL
]>;
diff --git a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVJointMatrixOps.td b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVJointMatrixOps.td
deleted file mode 100644
index f96849de9abb1e..00000000000000
--- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVJointMatrixOps.td
+++ /dev/null
@@ -1,243 +0,0 @@
-//===- SPIRVJointMatrixOps.td - joint matmul ---------------*- tablegen -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This is the op definition spec of joint matrix multiply extension ops.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef MLIR_DIALECT_SPIRV_IR_JOINT_MATRIX_OPS
-#define MLIR_DIALECT_SPIRV_IR_JOINT_MATRIX_OPS
-
-// -----
-
-def SPIRV_INTELJointMatrixWorkItemLengthOp : SPIRV_IntelVendorOp<"JointMatrixWorkItemLength",
- [Pure]> {
- let summary = "See extension SPV_INTEL_joint_matrix";
-
- let description = [{
- Return number of components owned by the current work-item in
- a joint matrix.
-
- Result Type must be an 32-bit unsigned integer type scalar.
-
- Type is a joint matrix type.
-
- #### Example:
-
- ```
- %0 = spirv.INTEL.JointMatrixWorkItemLength : !spirv.jointmatrix<Subgroup, i32, 8, 16>
- ```
- }];
-
- let assemblyFormat = "attr-dict `:` $joint_matrix_type";
-
- let availability = [
- MinVersion<SPIRV_V_1_0>,
- MaxVersion<SPIRV_V_1_6>,
- Extension<[SPV_INTEL_joint_matrix]>,
- Capability<[SPIRV_C_JointMatrixINTEL]>
- ];
-
- let arguments = (ins
- TypeAttr:$joint_matrix_type
- );
-
- let results = (outs
- SPIRV_Int32:$result
- );
- let hasVerifier = 0;
-}
-
-// -----
-
-def SPIRV_INTELJointMatrixLoadOp : SPIRV_IntelVendorOp<"JointMatrixLoad", []> {
- let summary = "See extension SPV_INTEL_joint_matrix";
-
- let description = [{
- Load a matrix through a pointer.
-
- Result Type is the type of the loaded matrix. It must be OpTypeJointMatrixINTEL.
-
- Pointer is the pointer to load through. It specifies start of memory region where
- elements of the matrix are stored and arranged according to Layout.
-
- Stride is the number of elements in memory between beginnings of successive rows,
- columns (or words) in the result. It must be a scalar integer type.
-
- Layout indicates how the values loaded from memory are arranged. It must be the
- result of a constant instruction.
-
- Scope is syncronization scope for operation on the matrix. It must be the result
- of a constant instruction with scalar integer type.
-
- If present, any Memory Operands must begin with a memory operand literal. If not
- present, it is the same as specifying the memory operand None.
-
- #### Example:
- ```mlir
- %0 = spirv.INTEL.JointMatrixLoad <Subgroup> <RowMajor> %ptr, %stride
- {memory_access = #spirv.memory_access<Volatile>} :
- (!spirv.ptr<i32, CrossWorkgroup>, i32) ->
- !spirv.jointmatrix<8x16xi32, ColumnMajor, Subgroup>
- ```
- }];
-
- let assemblyFormat = [{
- $scope $layout operands attr-dict `:` `(` type(operands) `)` `->` type($result)
- }];
-
- let availability = [
- MinVersion<SPIRV_V_1_0>,
- MaxVersion<SPIRV_V_1_6>,
- Extension<[SPV_INTEL_joint_matrix]>,
- Capability<[SPIRV_C_JointMatrixINTEL]>
- ];
-
- let arguments = (ins
- SPIRV_AnyPtr:$pointer,
- SPIRV_Integer:$stride,
- SPIRV_MatrixLayoutAttr:$layout,
- SPIRV_ScopeAttr:$scope,
- OptionalAttr<SPIRV_MemoryAccessAttr>:$memory_access,
- OptionalAttr<I32Attr>:$alignment
- );
-
- let results = (outs
- SPIRV_AnyJointMatrix:$result
- );
-}
-
-// -----
-
-def SPIRV_INTELJointMatrixMadOp : SPIRV_IntelVendorOp<"JointMatrixMad",
- [Pure, AllTypesMatch<["c", "result"]>]> {
- let summary = "See extension SPV_INTEL_joint_matrix";
-
- let description = [{
- Multiply matrix A by matrix B and add matrix C to the result
- of the multiplication: A*B+C. Here A is a M x K matrix, B is
- a K x N matrix and C is a M x N matrix.
-
- Behavior is undefined if sizes of operands do not meet the
- conditions above. All operands and the Result Type must be
- OpTypeJointMatrixINTEL.
-
- A must be a OpTypeJointMatrixINTEL whose Component Type is a
- signed numerical type, Row Count equals to M and Column Count
- equals to K
-
- B must be a OpTypeJointMatrixINTEL whose Component Type is a
- signed numerical type, Row Count equals to K and Column Count
- equals to N
-
- C and Result Type must be a OpTypeJointMatrixINTEL with Row
- Count equals to M and Column Count equals to N
-
- Scope is syncronization scope for operation on the matrix.
- It must be the result of a constant instruction with scalar
- integer type.
-
- #### Example:
- ```mlir
- %r = spirv.INTEL.JointMatrixMad <Subgroup> %a, %b, %c :
- !spirv.jointmatrix<8x32xi8, RowMajor, Subgroup>,
- !spirv.jointmatrix<32x8xi8, ColumnMajor, Subgroup>
- -> !spirv.jointmatrix<8x8xi32, RowMajor, Subgroup>
- ```
-
- }];
-
- let assemblyFormat = [{
- $scope operands attr-dict`:` type($a) `,` type($b) `->` type($c)
- }];
-
- let availability = [
- MinVersion<SPIRV_V_1_0>,
- MaxVersion<SPIRV_V_1_6>,
- Extension<[SPV_INTEL_joint_matrix]>,
- Capability<[SPIRV_C_JointMatrixINTEL]>
- ];
-
- let arguments = (ins
- SPIRV_AnyJointMatrix:$a,
- SPIRV_AnyJointMatrix:$b,
- SPIRV_AnyJointMatrix:$c,
- SPIRV_ScopeAttr:$scope
- );
-
- let results = (outs
- SPIRV_AnyJointMatrix:$result
- );
-}
-
-// -----
-
-def SPIRV_INTELJointMatrixStoreOp : SPIRV_IntelVendorOp<"JointMatrixStore", []> {
- let summary = "See extension SPV_INTEL_joint_matrix";
-
- let description = [{
- Store a matrix through a pointer.
-
- Pointer is the pointer to store through. It specifies
- start of memory region where elements of the matrix must
- be stored and arranged according to Layout.
-
- Object is the matrix to store. It must be
- OpTypeJointMatrixINTEL.
-
- Stride is the number of elements in memory between beginnings
- of successive rows, columns (or words) of the Object. It must
- be a scalar integer type.
-
- Layout indicates how the values stored to memory are arranged.
- It must be the result of a constant instruction.
-
- Scope is syncronization scope for operation on the matrix.
- It must be the result of a constant instruction with scalar
- integer type.
-
- If present, any Memory Operands must begin with a memory operand
- literal. If not present, it is the same as specifying the memory
- operand None.
-
- #### Example:
- ```mlir
- spirv.INTEL.JointMatrixStore <Subgroup> <ColumnMajor> %ptr, %m, %stride
- {memory_access = #spirv.memory_access<Volatile>} : (!spirv.ptr<i32, Workgroup>,
- !spirv.jointmatrix<8x16xi32, RowMajor, Subgroup>, i32)
- ```
-
- }];
-
- let assemblyFormat = [{
- $scope $layout operands attr-dict `:` `(` type(operands) `)`
- }];
-
- let availability = [
- MinVersion<SPIRV_V_1_0>,
- MaxVersion<SPIRV_V_1_6>,
- Extension<[SPV_INTEL_joint_matrix]>,
- Capability<[SPIRV_C_JointMatrixINTEL]>
- ];
-
- let arguments = (ins
- SPIRV_AnyPtr:$pointer,
- SPIRV_AnyJointMatrix:$object,
- SPIRV_Integer:$stride,
- SPIRV_MatrixLayoutAttr:$layout,
- SPIRV_ScopeAttr:$scope,
- OptionalAttr<SPIRV_MemoryAccessAttr>:$memory_access,
- OptionalAttr<I32Attr>:$alignment
- );
-
- let results = (outs);
-}
-
-// -----
-
-#endif // MLIR_DIALECT_SPIRV_IR_JOINT_MATRIX_OPS
diff --git a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVOps.td b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVOps.td
index 13533d1d65b8ff..9912f195ba11e6 100644
--- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVOps.td
+++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVOps.td
@@ -30,7 +30,6 @@ include "mlir/Dialect/SPIRV/IR/SPIRVCastOps.td"
include "mlir/Dialect/SPIRV/IR/SPIRVCompositeOps.td"
include "mlir/Dialect/SPIRV/IR/SPIRVControlFlowOps.td"
include "mlir/Dialect/SPIRV/IR/SPIRVCooperativeMatrixOps.td"
-include "mlir/Dialect/SPIRV/IR/SPIRVJointMatrixOps.td"
include "mlir/Dialect/SPIRV/IR/SPIRVIntelExtOps.td"
include "mlir/Dialect/SPIRV/IR/SPIRVGLOps.td"
include "mlir/Dialect/SPIRV/IR/SPIRVGroupOps.td"
diff --git a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVTypes.h b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVTypes.h
index 55f0c787b44403..d00bd818f48cca 100644
--- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVTypes.h
+++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVTypes.h
@@ -30,7 +30,6 @@ namespace detail {
struct ArrayTypeStorage;
struct CooperativeMatrixTypeStorage;
struct ImageTypeStorage;
-struct JointMatrixTypeStorage;
struct MatrixTypeStorage;
struct PointerTypeStorage;
struct RuntimeArrayTypeStorage;
@@ -420,35 +419,6 @@ class CooperativeMatrixType
std::optional<StorageClass> storage = std::nullopt);
};
-// SPIR-V joint matrix type
-class JointMatrixINTELType
- : public Type::TypeBase<JointMatrixINTELType, CompositeType,
- detail::JointMatrixTypeStorage> {
-public:
- using Base::Base;
-
- static constexpr StringLiteral name = "spirv.jointmatrix";
-
- static JointMatrixINTELType get(Type elementType, Scope scope, unsigned rows,
- unsigned columns, MatrixLayout matrixLayout);
- Type getElementType() const;
-
- /// Return the scope of the joint matrix.
- Scope getScope() const;
- /// return the number of rows of the matrix.
- unsigned getRows() const;
- /// return the number of columns of the matrix.
- unsigned getColumns() const;
-
- /// return the layout of the matrix
- MatrixLayout getMatrixLayout() const;
-
- void getExtensions(SPIRVType::ExtensionArrayRefVector &extensions,
- std::optional<StorageClass> storage = std::nullopt);
- void getCapabilities(SPIRVType::CapabilityArrayRefVector &capabilities,
- std::optional<StorageClass> storage = std::nullopt);
-};
-
// SPIR-V matrix type
class MatrixType : public Type::TypeBase<MatrixType, CompositeType,
detail::MatrixTypeStorage> {
diff --git a/mlir/lib/Dialect/SPIRV/IR/CMakeLists.txt b/mlir/lib/Dialect/SPIRV/IR/CMakeLists.txt
index b185264211474f..7d760e0dd80222 100644
--- a/mlir/lib/Dialect/SPIRV/IR/CMakeLists.txt
+++ b/mlir/lib/Dialect/SPIRV/IR/CMakeLists.txt
@@ -9,7 +9,6 @@ add_mlir_dialect_library(MLIRSPIRVDialect
CooperativeMatrixOps.cpp
GroupOps.cpp
IntegerDotProductOps.cpp
- JointMatrixOps.cpp
MemoryOps.cpp
SPIRVAttributes.cpp
SPIRVCanonicalization.cpp
diff --git a/mlir/lib/Dialect/SPIRV/IR/CastOps.cpp b/mlir/lib/Dialect/SPIRV/IR/CastOps.cpp
index 52b4380ed27f7c..e27dc274673be4 100644
--- a/mlir/lib/Dialect/SPIRV/IR/CastOps.cpp
+++ b/mlir/lib/Dialect/SPIRV/IR/CastOps.cpp
@@ -36,8 +36,7 @@ static LogicalResult verifyCastOp(Operation *op,
using TypePair = std::pair<Type, Type>;
auto [operandElemTy, resultElemTy] =
TypeSwitch<Type, TypePair>(operandType)
- .Case<VectorType, spirv::CooperativeMatrixType,
- spirv::JointMatrixINTELType>(
+ .Case<VectorType, spirv::CooperativeMatrixType>(
[resultType](auto concreteOperandTy) -> TypePair {
if (auto concreteResultTy =
dyn_cast<decltype(concreteOperandTy)>(resultType)) {
diff --git a/mlir/lib/Dialect/SPIRV/IR/JointMatrixOps.cpp b/mlir/lib/Dialect/SPIRV/IR/JointMatrixOps.cpp
deleted file mode 100644
index 63305ecdd0c4e9..00000000000000
--- a/mlir/lib/Dialect/SPIRV/IR/JointMatrixOps.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-//===- JointMatrixOps.cpp - MLIR SPIR-V Intel Joint Matrix Ops -----------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// Defines the Intel Joint Matrix operations in the SPIR-V dialect.
-//
-//===----------------------------------------------------------------------===//
-
-#include "mlir/Dialect/SPIRV/IR/SPIRVOps...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/102332
More information about the Mlir-commits
mailing list