[all-commits] [llvm/llvm-project] bf016b: [mlir][spirv] Add support for SPV_ARM_tensors (#14...

Davide Grohmann via All-commits all-commits at lists.llvm.org
Wed Jul 2 10:36:53 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bf016b930b5ccb3072370399845067cf55e62732
      https://github.com/llvm/llvm-project/commit/bf016b930b5ccb3072370399845067cf55e62732
  Author: Davide Grohmann <davide.grohmann at arm.com>
  Date:   2025-07-02 (Wed, 02 Jul 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
    M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVTypes.h
    M mlir/lib/Dialect/SPIRV/IR/SPIRVDialect.cpp
    M mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp
    M mlir/lib/Dialect/SPIRV/IR/SPIRVTypes.cpp
    M mlir/lib/Target/SPIRV/Deserialization/DeserializeOps.cpp
    M mlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp
    M mlir/lib/Target/SPIRV/Deserialization/Deserializer.h
    M mlir/lib/Target/SPIRV/Serialization/Serializer.cpp
    M mlir/test/Dialect/SPIRV/IR/types.mlir
    A mlir/test/Target/SPIRV/tensorARM.mlir

  Log Message:
  -----------
  [mlir][spirv] Add support for SPV_ARM_tensors (#144667)

This patch introduces a new custom type `!spirv.arm.tensor<>` to the
MLIR SPIR-V dialect to represent
`OpTypeTensorARM` as defined in the `SPV_ARM_tensors` extension.

The type models a shaped tensor with element type and optional shape,
and implements the
`ShapedType` interface to enable reuse of MLIR's existing shape-aware
infrastructure.

The type supports serialization to and from SPIR-V binary as
`OpTypeTensorARM`, and emits the
required capability (`TensorsARM`) and extension (`SPV_ARM_tensors`)
declarations automatically.

This addition lays the foundation for supporting structured tensor
values natively in SPIR-V and
will enable future support for operations defined in the
`SPV_ARM_tensors` extension, such as
`OpTensorReadARM`, `OpTensorWriteARM`, and `OpTensorQuerySizeARM`.

Reference: https://github.com/KhronosGroup/SPIRV-Registry/pull/342

---------

Signed-off-by: Davide Grohmann <davide.grohmann at arm.com>
Signed-off-by: Mohammadreza Ameri Mahabadian <mohammadreza.amerimahabadian at arm.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list