Issue 152129
Summary [mlir][tosa] Replace `StringBasedAttr` TOSA enumerations with `Tosa_I32EnumAttr`
Labels good first issue, mlir:tosa
Assignees
Reporter lhutton1
    The TOSA enumerations defined in the specification here: https://mltech.ml.arm.com/spec/tosa/nightly-stable/tosa_spec.html#_enumerations are currently represented in the dialect using `StringBasedAttr`. This means we need to compare strings to when checking the value of the attribute e.g. https://github.com/llvm/llvm-project/blob/98a6fed0965702619162243be263626380a6c0f6/mlir/include/mlir/Dialect/Tosa/IR/TosaTypesBase.td#L244. Currently the following enumerations are represented this way: `Tosa_ResizeTypeAttr`, `Tosa_NanPropagationAttr` and `Tosa_RoundingTypeAttr`, here: https://github.com/llvm/llvm-project/blob/98a6fed0965702619162243be263626380a6c0f6/mlir/include/mlir/Dialect/Tosa/IR/TosaTypesBase.td#L239-L240

A more natural way to represent these enumerations would be using a `Tosa_I32EnumAttr`, similar to profiles and extensions here: https://github.com/llvm/llvm-project/blob/main/mlir/include/mlir/Dialect/Tosa/IR/TosaOpBase.td#L261. Therefore, this task is to rewrite `Tosa_ResizeTypeAttr`, `Tosa_NanPropagationAttr` and `Tosa_RoundingTypeAttr` enumerations using `Tosa_I32EnumAttr`.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to