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

    <tr>
        <th>Summary</th>
        <td>
            MLIR  Tensor type encoding parser does not abort on parse error
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            mlir:core
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          joker-eph
      </td>
    </tr>
</table>

<pre>
    `Type Parser::parseTensorType()` calls `parseAttribute()` for the encoding, but consider that if a null attribute is returned it is just that it wasn't present. However it can also be a parse failure, like below:

```
$ echo '!type = tensor<256x32xf16, #blocked>' | build/bin/mlir-opt 
<stdin>:1:36: error: undefined symbol alias id 'blocked'
!type = tensor<256x32xf16, #blocked>
 ^
module {
}


$ echo $?
0
```


`mlir-opt` should error out in this case, but it does not and parse "successfully", omitting the invalid "encoding".
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUk9tu4zYQhp9mdDOIQQ11iC504U1qtEALFMW-AEWOLCY0afCQbN6-oGJjd4veLCBIpDgczv_xH5WSPXvmGfov0D83quQtxPklvHJ84OvWLMF8zDCIrx9Xxr9VTBxBHkEer3X8lX0Ksa4BPQJNMAjUyrmEMIg94phztEvJPwSsIWLeGNnrYKw_Az3hUjLq4JM1XBdVRruiQl-cQ3VPgTZh5FyiZ4M21-lLSfkWn_FdJQ80ZrxGTuzzAX8P7_zGsS5q5VG5FHBhVLjXhquyrkSuBTj7yriwC-9VnngGcX8P4vZ8TqlD1ltAoBGozRULyGfMOwmQT9QP3yR9W9uhpgWSiwv6lQ3I34BGhLGKtc4AnRbrgU4XZ-NDuGa8HSCfUjbW13h5bEEe5QDyiBxjzX_E4g2vtiJIH5clOFTOqoTW1JLuh9F4L_cXS9x3IfS30SWY4hhh_HLLNz7_BOe_TDqQp8-f4v_x_Uz2rr3aIm2hOPOpE0PJaD3mzSbUKvHdIzajCZzQh4zKm9s9AlEqWnNKa3HuA4hqfLjYnK0_72az_k25nRF99x0dGjNLM8lJNTy3w9Q_inZqu2abZSsmJR5pWnq1ajJD1y4tadaiW1apdWNnEiTFRKN4FH3bHQQP3TSuxqhW62GV0Am-KOsOzr1dDiGeG5tS4XkYe-obpxZ2aW87oooB5FGH6kWqfRjnuuthKecEnXA25fQ9T7bZ8fzXn3_8g_jZgbhf8l3YJ5X4A6klxIzB33DtiJsS3bzlfE3V8HQCOp1t3spy0OECdKqn3T4P1xheWGeg0y4hAZ12Ff8GAAD__0-RT-Y">