<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/94901>94901</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[MLIR] tensor::GatherOp gather_dims not verified correctly?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
mlir
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ziereis
</td>
</tr>
</table>
<pre>
Hello,
`func.func @basic(%arg0: tensor<2x2xi64>, %arg1: tensor<4x4x4xf32>) -> tensor<2x1x1x1xf32> {
%gather = tensor.gather %arg1[%arg0] gather_dims([0, 1, 2]) : (tensor<4x4x4xf32>, tensor<2x2xi64>) -> tensor<2x1x1x1xf32>
return %gather : tensor<2x1x1x1xf32>
}
`
As far as I can tell the number of gather_dims should match the size of the least significant dimension of the indices tensor but the module displayed above doesn't result in an error.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8k9Fu2zoMhp-GviEayLQd2xe-SJrmnAIbBuwFBtmiYw2yFEhy0PbpBznJ1gJbIYA2pJ_kR4qSIeiTZe6g2kN1yOQSJ-e7N82edch6p167_9kYB_SIIA4gdje7FeNih00yCKXoZdADUANUSX8SUOwwsg3OQ_FIL_SityUUT2uUVZF_UJQvaY0FrZoWH6B4eu-fr-t6jlDvrwyYYp1knNgjFIebw-a-c8tT7e9M1QGvZz-UnkOCrfYiIeXJEFSHlDuBATX_YHv8e1mfI99xPcfF2w_Uu899oD787vf79u8CjtKjDPiMg7QY2RiME6Nd5p49uvF9qRgmtxiFs4zDtMqCfuMkSv-GZYiY5kCPepA2otIz26CdvUu0VXrgcGPFfonr9uzUYhiVDmcjX1mh7N2FUTkOFqiO6DksJqK2KC2y985vMFNdodqilRl3eZ3XbdHW1GRT11fVVlBTcl9SW9SiksPYbqmXamhq6ttMdySoFFvR5gU1ZbMRfaFI8HZsJMuybqAUPEttNsZc5o3zp0yHsHDXlq3IMyN7NmGddKLZaA-U7jzzXZI_9MspQCmMDjH8CRB1NOvr-Prl-XuaoPt17aDY_be2-Nv5Q6-ti3hhr0fNCgfnPQ_RvEJxzBZvuinGc0jedAQ6nnScln4zuBnomHLePg9n737yEIGOawUB6Hgt4tLRrwAAAP__6wEkww">