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

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

    <tr>
      <th>Labels</th>
      <td>
            good first issue
      </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_ScalarInt8Tensor. 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 or here: https://github.com/llvm/llvm-project/pull/150399. Tests should also be added to support the change.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJykkzFv2z4QxT8NtRxk0JQVWYMG__GHgU4d4r04iieJLU2q5DFBvn0h2nECtEvRQdBw5PHe773DlOzsiQbR_ifa_yvMvIQ4uCUzB7-vdDBvw_OIDiOElSJ6k8B64IXg8vX5BMaio5EBI8GYYyTP7g0i_cw2kgEOoAki-h9kdnBZbAJHaNJWsCllSkKdI60hcoJkr3Z7iEPpPwXnwqv1s2hOsDCvSTQnoc5CnY1NY8gx0c65l-suxFmoM29fSFivaOr7sPU1J6411aUwBj-FeEXPdSqaaiafQqzDVPt81RTrF3S3oY7doVFCnoQ83fXfzqYi1dBkPRl4tbyUYRm1o5n8rWLZBg-XkPDb7fIXz8dLuX-nUMTDa8jOvNOCvBpk62fg7cSnRhwANxaAkD7PshXI8kLxgzKECNm_Ez89oK7ZufISJYYpRIg0USQ_Eozot_tTyN7AQpF-Bz5bXrLejeEq1Hljfv_VawzfadzQbw8Idd4fmq6T2xT_3KmVTd_v4EJpC8dSWKFLJVJozC1eKa9beooJ44J-pl1lhsb0TY8VDfuubZpj3z811TK0WmvsdNdQK_HYjUpNI-2l1ka2qkFZ2UFJ1cpOHZQ8PMlmtyfdEraSVP9kRhzFQdIVrXvkripGDvtWtvu-cqjJpbJMSs0hGJhsTHxzWyi1rVgcilyd5yQO0tnE6aMbW3Y0nIrZd6ut5-Mje7d9evf3T5tY5eiGv0b-2MW7kJdB_QoAAP__fK5pSA">