Tosa supported element types

We are using tosa.transpose on our si8 tensor, but this is currently not supported, due to the current declaration of Tosa_SignedInt:

def Tosa_Int8 : I<8>;
def Tosa_Int16 : I<16>;
def Tosa_Int32 : I<32>;
def Tosa_Int48 : I<48>;
def Tosa_Int64 : I<64>;

def Tosa_SignedInt : AnyTypeOf<[Tosa_Int8,

I can solve it by adding SI8 to Tosa_SignedInt, but I don’t know if it is the right thing to do.
Tosa_AnyNumber uses Tosa_SignedInt so it will change as well.
This affects other operations in Tosa which I’m not too familiar with…
Thanks in advance,

I believe you should be able to surround the transpose op with UnrealizeConversionCastOps to cast your SI8 to and from I8. Transpose shouldn’t modify the contents, so there shouldn’t be any issue with the TOSA op itself.
You can see some examples in llvm-project/TosaToLinalg.cpp at main · llvm/llvm-project · GitHub

1 Like