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

    <tr>
        <th>Summary</th>
        <td>
            Allow scalar tensors to be unranked in the TOSA dialect
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            good first issue,
            mlir:tosa
      </td>
    </tr>

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

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

<pre>
    Scalar operands in the TOSA dialect are currently required to be ranked. This leads to issues/reports similar to the following: https://discourse.llvm.org/t/tosa-pad-operand-must-be-tosa-conformant-scalar-tensor-of-number-values/87432

Scalar tensors are defined with the tablegen definition `Tosa_ScalarTensor`. This issue would require updating this definition to allow a scalar tensor to either be ranked or unranked. A similar pull request for reference can be found here: https://github.com/llvm/llvm-project/pull/143770. Tests should also be added to support the change.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUk8-OxCYMxp-GXKyMCCSTmUMOaVdz7WHnXpHgJLQEUgy72revYGb_VO2lhygSxtjf77MVkVkd4sC6X1j3UqkUNx8Gu6UYvWuqyeuP4XVWVgXwBwblNIFxEDeE-2-vI2ijLM4RVECYUwjoov2AgH8lE1BD9DAhBOX-RH2C-2YILCpNOWCIEhITt4CHD5GAzG5yoejL-4u31r8btzI5whbjQUyOTNyYuGlDs0-B8GTt237yYWXiFvPnSdWH0vWz2XpPFOsJ6xKYvVt82JWLNRVNdURHPtR-qV3aJwz1m7KPpi59KwXjI-PjU__jLhWpGhfjUMO7iVtpNqrJ4oruETHReAfszO-e1O-P_HtJZ2f-5FDkw7tPVn_ygnRoFY1bIeYbP56KHlSmAQroZzc5gCZuGL45gw-Q3Cfz8QvrkawtlZAiLD5AwAUDuhlhVi7nLz45DRsG_Dfy1cQtTafZ70zcMvXnrz6C_wPnDD8XYOLWtLLvs0qkbOpWFCpLZRSU1o-xoHRk1wu8eVNuxVOlB6mv8qoqHJq-k_xy4Y2stqFd2n7hc3_VcyM7rqfLeblM_bWfZNfrFiszCC463ouGXzop5Yk3WkjZzbrTM1_OZ9Zy3JWxX_NSFfxD0177_lpZNaGlsgRCrN5rWEyg-PCICcHEr0yI3ZrA5JhHKZ91L1UYCoIprcRabg1F-q4QTbQ4jMU2-ucIPdbi06T_WqgqBTv8bwe-Vuqp620QfwcAAP__QSBUhw">