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

    <tr>
        <th>Summary</th>
        <td>
            Bug or insufficient utility in `transform.structured.split` op
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

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

<pre>
    First of all I've identified an inconsistency in the way static and dynamic split points are handled.  basically, no matter what in the static case, a single split point is provided and works no matter how many target payloads there are (see https://github.com/llvm/llvm-project/blob/main/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp#L2208). Whereas with the dynamic case, the number of split points is determined by the number of payloads of the dynamic split point operand (see https://github.com/llvm/llvm-project/blob/main/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp#L2208). but then the number of split points is compared to the number of target payloads (https://github.com/llvm/llvm-project/blob/main/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp#L2200). 

I can't quite put my finger on it, but this seems wrong to me. For example, consider the edge case where there are no target payloads.  In this case the static doesn't throw any definite failures while the dynamic case does.  I think at the very least, there should be consistency here. but the question is, which one do we go with.  I actually prefer how the static case works for this. because otherwise we would have to know that a payload is present to be able to use the op in the first place, which i don't think is very useful.

I was working on a patch for this to handle some case i needed. but then i realized that there was this discrepancy between the number of split point payloads and number of target payloads. I admit I'm a little confused about what the relationship between these two things should actually be.  But I'm almost certain they shouldn't necessarily be the same size.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMVUFv40YP_TXyhfgEWbGt5ODD7hcYCLBALwV6pjSUxGY0ox1yonp_fTEj23FStEVvm0MEjDnk4-PjGxThwREdi_3XYv-8waijD0cJHYbgrd203pyPJw6i4HtAa-GlqJs3AjbklHsmA-iAXeedsCi57gzsQEeCBc8gisodoDNgzg4n7kBmywqzZ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