[Mlir-commits] [mlir] [mlir][spirv] Enable (de)serialization of TensorARM to/from OpConstan… (PR #151485)
Jakub Kuderski
llvmlistbot at llvm.org
Thu Jul 31 05:31:50 PDT 2025
================
@@ -1789,8 +1789,17 @@ spirv::Deserializer::processConstantNull(ArrayRef<uint32_t> operands) {
}
auto resultID = operands[1];
+ Attribute attr;
if (resultType.isIntOrFloat() || isa<VectorType>(resultType)) {
- auto attr = opBuilder.getZeroAttr(resultType);
+ attr = opBuilder.getZeroAttr(resultType);
+ } else if (isa<TensorArmType>(resultType)) {
+ auto shapedType = cast<ShapedType>(resultType);
+ auto element = opBuilder.getZeroAttr(shapedType.getElementType());
+ if (element)
----------------
kuhar wrote:
```suggestion
} else if (auto tensorType = dyn_cast<TensorArmType>(resultType)) {
if (auto element = opBuilder.getZeroAttr(tensorType.getElementType()))
```
https://github.com/llvm/llvm-project/pull/151485
More information about the Mlir-commits
mailing list