<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/57173>57173</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Not able to lower tosa code into llvm code
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          HemaSowjanyaMamidi
      </td>
    </tr>
</table>

<pre>
    Hi,
@River707 , @eric-k256 
I am experimenting on how to use different dialects and lower them into LLVM code. Then I came across the TOSA dialect which has the layers supported by the Neural Network models and thought to build a small model out of it. So, initially I took a small operation tosa.const and tried to lower to LLVM code and wasn't successful. Can you please help me out what am I missing?

module{
func.func @main() -> tensor<3xi32>
{
%2 = "tosa.const"() {value = dense<[3,4,5]> : tensor<3xi32>} : () -> tensor<i32>
return %2 :  tensor<3xi32>
}
}

mlir-opt test_tosa.mlir --tosa-to-arith --arith-expand --convert-arith-to-llvm --convert-func-to-llvm

The intermediate representation is not completely lowered. Can you please help me regarding this conversion. 

Thanks,
Hema
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx1VNuOm0AM_Rp4sUCESxIeeNhuuupKvUjdqq-VYZww3WEGzWXT_H09kG3TqpUSZnzBPraP6Y24dO9kUt4nxSEp7pK6-CxfyO6KHbASWCYrh-y5bLawujwCTkA_ZtZPpL3UJzAaRnMGbyA4AiGPR7Js4hsqGrwD1AKUOZMFP9IEUrPr-_dfP8BgBOXwZSQNjzDgRICDNc5FP_jy6enuNQacRzmMMOJqUngh68CFeTbWk4D-sug_UrCo-PBnY59h4vBqTe9HE06jjyD7IJUABDehUqsPmODBHEH6HJ5MrFxq6Tm1ujAwb8zzL3_DlaOXXLM3DvPBaOfXDFYyEI5_rfSmxMV-RqeTcucZ9TCQc8egcrhHDRcTYFaE3LuR1AzchQjnPKKPvX6ESTrHfU6qh-uUlicDD4qS3ZtVPAY95PERhzah5Fz7pGwhS6q34Ek7Y5Pqvvohq5I110CvLydlU0JSHXjo5e-yWLgGYccXVIEWH8HBiGMlzZuKW1Xzv0maQ8yTVHf_yLU7LIZ_ArqFY8kHq-EK5g7-D_vw92XtiJI2MzMPmZz_ttQRVZBl8c6PDK30I8vLmTGL42CyjKtl0vurmv2Ueplu9LGtr-rbhEzcSGayEzFPPYGl2ZJj7q8MkQ608UyBiefricm0cIPEfwdv6YRWxKXyI7-9AnAcK4c_E6N-dr_W9h1NmFK32W6LbV23ZZGKrhJt1WLqpVfUfWQU2Cu6pafDlZvLNi4FRzENVnWj97PjCSTlA_9O3JTQMyUmFpYWrEc2W_Odd5NFJmggxvPQ7Da7Kh07qkVbHEUvUFQ19TXuy_LYN_vjthEt1UWqsOfV7JhDzDJNZ1hCRMY1h1R2ZVGWxX6z3RSbZtPmQ79v99u6bKioW9rX8bvEHFd5xJEbe0ptt0Dqw8mxUUnn3W8j8v6cNNGSjuNj4M-B7WLbnsz5O-oLfsBJCpkuKLqlip8ytKQo">