[all-commits] [llvm/llvm-project] 3c4ab4: [mlir][tosa] Handle unsigned constants in `TosaCon...

Luke Hutton via All-commits all-commits at lists.llvm.org
Tue Sep 16 10:55:32 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3c4ab4fdefcbd34106163899d7e2914246328616
      https://github.com/llvm/llvm-project/commit/3c4ab4fdefcbd34106163899d7e2914246328616
  Author: Luke Hutton <luke.hutton at arm.com>
  Date:   2025-09-16 (Tue, 16 Sep 2025)

  Changed paths:
    M mlir/lib/Dialect/Tosa/Transforms/TosaConvertIntegerTypeToSignless.cpp
    M mlir/test/Dialect/Tosa/tosa-convert-integer-type-to-signless.mlir

  Log Message:
  -----------
  [mlir][tosa] Handle unsigned constants in `TosaConvertIntegerTypeToSignless` (#156483)

This commit fixes handling of unsigned constant data in the
`TosaConvertIntegerTypeToSignless` pass. Previously, the type of the
"values" attribute would remain unsigned, which caused an error in the
const ops verifier:
```
error: 'tosa.const' op expected same attr/result element types
  %input_zp = "tosa.const"() {values = dense<17> : tensor<1xui8>} : () -> tensor<1xui8>
              ^
note: see current operation: %0 = "tosa.const"() <{values = dense<17> : tensor<1xui8>}> : () -> tensor<1xi8>
```
Now the constant data in "values" is transformed to signless as well.



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