[Mlir-commits] [mlir] [mlir][spirv] Add support for SPV_ARM_tensors (PR #144667)

Jakub Kuderski llvmlistbot at llvm.org
Mon Jun 30 09:23:14 PDT 2025


================
@@ -477,6 +479,45 @@ class MatrixType : public Type::TypeBase<MatrixType, CompositeType,
                        std::optional<StorageClass> storage = std::nullopt);
 };
 
+/// SPIR-V TensorARM Type
+class TensorArmType
+    : public Type::TypeBase<TensorArmType, CompositeType,
+                            detail::TensorArmTypeStorage, ShapedType::Trait> {
+public:
+  using Base::Base;
+
+  using ShapedType::Trait<TensorArmType>::getElementTypeBitWidth;
----------------
kuhar wrote:

nit: If you want, you can use a typedef for this trait and then use that in all of these using declarations. Something like:

```c++
using ShapedTypeTraits = ShapedType::Trait<TensorArmType>;
using ShapedTypeTraits::getElementTypeBitWidth;
```

https://github.com/llvm/llvm-project/pull/144667


More information about the Mlir-commits mailing list