<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/114528>114528</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[mlir][affine] Affine super vectorize should guard against empty virtual-vector-size option
</td>
</tr>
<tr>
<th>Labels</th>
<td>
mlir
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
oowekyala
</td>
</tr>
</table>
<pre>
When calling `mlir-opt --affine-super-vectorize`, nothing happens, because the default for `virtual-vector-size` is empty, and all current vectorization patterns require vector rank 1, 2 or 3 (whereas empty vector sizes means rank 0). When calling additionally with option `vectorize-reductions`, then an error is printed (`Vectorizing reductions is supported only for 1-D vectors.`), because then the vector rank must be 1.
I think the pass should check if the rank is zero and fail, informing the user that the virtual-vector-size option must be specified.
Optionally, we could add a default for the option, eg 8.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0U02PmzAQ_TXmMgKBCUk4cNhtFKmn3trzxB7AjbGpPxJlf31lAt3dVr0kyJ733rw3HvReDYaoY80ra04ZxjBa11l7p-sDNWYXKx_dj5EMCNRamQHYvpy0crmdA-Q59r0ylPs4k8tvJIJ16o3YvmT8CxgbxgQZcZ7J-HR0IYHRE4SRQFKPUQforUusN-VCRL2y5P7JA8oDTXN4JDQaCag1iOgcmQCbIAZlDcwYAjnjwdGvqByt1-DQXKFKeA7WQQ2MH-8jOcKVeitMkh4mwsSRQCXjbQGf7KOUKqmh1g-4qzCCnRf15GDznzuSUaRjv0YREgcaIOesS55mp0wgmXph-_L7ikwK79hU5-M8W5cqrdGPJasqP60d-2Khb_9K1izxfnQ_RR_gQlAVrDyx8uX5-xXSfK5L9Yzegx9t1BLESOIKql8uFrzy8EbOLgPoUekkqExv3ZQ6TmXRk4MwYnhq_zvLLaetFT-TUL0iWcDHnr7NW7pJ404glpZQSsBPLybJPClTIQ1wLDLZ1bKtW8yoqw51uWvaqj1kYydbcTgeD3i8HOqa6p5LLitqhMRdycteZKrjJd9VVVlVVbmvD8WOGhSy5oe6bHtx3LNdSRMqXWh9mwrrhkx5H6mrql3Dj5nGC2m_bBHnaT0Y52mfXJfq80scPNuVWvng3xmCCnrZvAXQnFjz-lwn1pzgZfmCZbH-vHPaJjREdBJwQGV82B7xfzPPotPdGMLsWf3C-Jnx86DCGC-FsBPj59TR-pfPzv4kERg_LwY94-fV463jvwMAAP__VTVsmA">