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

    <tr>
        <th>Summary</th>
        <td>
            [Linalg] Incorrect code generated when using underscore in attribute names in core_named_ops.py
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            build-problem,
            mlir:linalg
      </td>
    </tr>

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

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

<pre>
    Linalg generates incorrect C++ code from `LinalgNamedStructuredOps.yaml`, when attribute names in `core_named_ops.py` contain underscores (e.g. `kernel_size`). The generated code uses `getKernel_size()`, while it should be `getKernelSize()`.

The issue came up in a discourse thread and according to [this comment](https://discourse.llvm.org/t/crash-when-running-update-core-linalg-named-ops-sh/66115/10?u=gargaroff) from @stellaraccident should be considered as a bug for now, hence this issue.

How to reproduce:
1. Add an attribute in `core_named_ops.py` with an underscore
2. Generate the yaml file using `bin/update_core_linalg_named_ops.sh`
3. Run ninja to compile

The compiler will fail, because `getKernel_size()` does not exist.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx9U8tu2zAQ_BrpspCgd6yDDkmMtEWLFmh7NyhxJTGlSIOPuunXdykZttMAASTTIrm7M7OzveYv3RehmJxgQoWGObQg1KCNwcHBY1Q80AOD5gij0QtETbbd_8oW5D-c8YPzBvm3o01f2CLpPCoe4TSjAuacEb13CIouh7whnHLjIWzwg6ag4wvtUQHlGJ17xdHYcMVCVOwwndIQ8wuNQnmw4i-uBdoUfs54gcw3gN6GqCab0H2-CSh2FHDBJSSCcGBn7SWHHl8F_Li9n0bZPsrut99QTljrEQaCDv4Y2DDggsB6YxHcbJBxYIregQhwoSZwGqL6wc3CEsJlQeWiek8FZueONirvo-KJnkuSVMrfS6rNRJuO3sEwOydBy8R4pShj4o-cCCdBoUSujUhWLRPSMrEzBTVNnte05llUPvmo3E_M0KPHkWidm1hl1qGUzBBUwQnWjR7UCkt71FNglij2foJRG1D6FBQkMENgS5RWPV6p9FGfAmeDR6O5HzBQXA_yFO55UOfGFO_Y4STcHC5f7bClKVL4cO45QUAIjoMxtNTboDfF9kIR-U2mw5p8k-mmBslEblgTlil89wpI2mcWkFOXjpTu_86ftw0Bk1SQCRmk6HFg5Ll3LAdckyWVdoB_hHVpjF3eNM3dXVaXecy7krdly2InnMSOnLKNFnkEPl1mcLX21enrZG1sr-qsZnw7bW-0jb2R3WvzTSS171NiSB_Bf-cloRY-U336XPts6U-9a_I2nruxbfIsH6u8rIt8l7d9NWTVWFV1VnHEbIgl61HawCgqit4LyUO6XiJlL4J0tCxSGEKxdSds1_tYdEVWFHlWNNldtavztG9ZXvQ4Di1iWVQVORcXkv8yKbHpVrTkUkuHklS210NmrZgUrtqG_My7WZvuMhHxSq1bef0DpK-seQ">